https://bugs.llvm.org/show_bug.cgi?id=52330

            Bug ID: 52330
           Summary: lld/mac crashes when ICFing code with undefs
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedb...@nondot.org
          Reporter: nicolaswe...@gmx.de
                CC: g...@fb.com, jezr...@gmail.com,
                    llvm-bugs@lists.llvm.org, smee...@fb.com

I noticed this in .s form while working on PR51999 (not caused by the fix
there). Turns out it's easy to hit from .c files too:

% cat foo.c
void g();
int main() { g(); }

% out/gn/bin/clang foo.c -fuse-ld=lld -Wl,--icf=all --target=arm64-apple-macos
-isysroot $(xcrun -show-sdk-path -sdk macosx) -fno-exceptions
foldIdenticalSections symbol kind
UNREACHABLE executed at ../../lld/MachO/ICF.cpp:250!


We shouldn't crash here but emit an "undefined symbol" error instead.

(I'll take a look.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to