Files
clang-p2996/lld/MachO
alx32 f9d3e98207 [lld-macho] Improve robustness of ObjC category merging (#112618)
This patch enhances the robustness of lld's Objective-C category
merging. Currently, the category merger assumes it can fully parse and
understand the format of all categories in the input, triggering an
assert if any invalid category data is encountered.

This will end up causing asserts in certain rare corner cases that are
difficult to reproduce in small test cases. The proposed changes modify
the behavior so that if invalid category data is detected, category
merging is skipped for that specific class and all other categories
sharing the same base class. This approach allows the linker to continue
processing other categories without failing entirely due to a single
problematic input.

We also add a LIT test to where we corrupt category data and check that
category merging for that class was skipped but the link was successful.
2024-10-18 11:03:16 -07:00
..