[all-commits] [llvm/llvm-project] db78ee: [lld-macho] Fix address sanitizer for category mer...
alx32 via All-commits
all-commits at lists.llvm.org
Thu May 9 17:57:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: db78ee0cb82669302a5e0f18a15fd53346a73823
https://github.com/llvm/llvm-project/commit/db78ee0cb82669302a5e0f18a15fd53346a73823
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths:
M lld/MachO/ObjC.cpp
Log Message:
-----------
[lld-macho] Fix address sanitizer for category merging (#91680)
FIxing the address sanitizer issue reported in
https://github.com/llvm/llvm-project/pull/91548 .
The problem comes from the assignment `auto bodyData = newSectionData`
which defaults to `SmallVector<uint8_t> data = newSectionData` - which
actually creates a copy of the data, placed on the stack.
By explicitly using `ArrayRef` instead, we make sure that the original
copy is used.
We also change the assignment in `ObjcCategoryMerger::newStringData`
from `auto` to `SmallVector<uint8_t> &` to make it explicit.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list