[all-commits] [llvm/llvm-project] 0df918: [lld-macho] Fix crash: ObjC category merge + relat...
alx32 via All-commits
all-commits at lists.llvm.org
Wed Aug 14 19:31:03 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0df91893efc752a76c7bbe6b063d66c8a2fa0d55
https://github.com/llvm/llvm-project/commit/0df91893efc752a76c7bbe6b063d66c8a2fa0d55
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2024-08-14 (Wed, 14 Aug 2024)
Changed paths:
M lld/MachO/ObjC.cpp
M lld/test/MachO/objc-category-merging-minimal.s
Log Message:
-----------
[lld-macho] Fix crash: ObjC category merge + relative method lists (#104081)
A crash was happening when both ObjC Category Merging and Relative
method lists were enabled.
ObjC Category Merging creates new data sections and adds them by calling
`addInputSection`. `addInputSection` uses the symbols within the added
section to determine which container to actually add the section to.
The issue is that ObjC Category merging is calling `addInputSection`
before actually adding the relevant symbols the the added section. This
causes `addInputSection` to add the `InputSection` to the wrong
container, eventually resulting in a crash.
To fix this, we ensure that ObjC Category Merging calls
`addInputSection` only after the symbols have been added to the
`InputSection`.
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