Closed
Description
https://drive.google.com/file/d/1ju1O-uXLu4JGq_FbVb3wu4ugiZ_MAWPR/view?usp=sharing
Assertion failed: (file.lazy), function extract, file InputFiles.cpp, line 2224.
Process 12725 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
frame #4: 0x00000001007dae48 ld64.lld`lld::macho::extract(lld::macho::InputFile&, llvm::StringRef) + 300
ld64.lld`lld::macho::extract:
-> 0x1007dae48 <+300>: bl 0x106b3f788 ; symbol stub for: __asan_handle_no_return
0x1007dae4c <+304>: adrp x0, 27829
0x1007dae50 <+308>: add x0, x0, #0xb80 ; __func__._ZN4llvm4castIN3lld5macho18ConcatInputSectionENS2_12InputSectionEEEDcPT0_
0x1007dae54 <+312>: adrp x1, 27829
Target 0: (ld64.lld) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
frame #0: 0x0000000185632d98 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x0000000185667ee0 libsystem_pthread.dylib`pthread_kill + 288
frame #2: 0x00000001855a2340 libsystem_c.dylib`abort + 168
frame #3: 0x00000001855a1754 libsystem_c.dylib`__assert_rtn + 272
* frame #4: 0x00000001007dae48 ld64.lld`lld::macho::extract(lld::macho::InputFile&, llvm::StringRef) + 300
frame #5: 0x0000000100835dc0 ld64.lld`lld::macho::SymbolTable::addUndefined(llvm::StringRef, lld::macho::InputFile*, bool) + 1096
frame #6: 0x00000001007da798 ld64.lld`lld::macho::BitcodeFile::parse() + 2056
frame #7: 0x0000000100835dc0 ld64.lld`lld::macho::SymbolTable::addUndefined(llvm::StringRef, lld::macho::InputFile*, bool) + 1096
frame #8: 0x00000001007da798 ld64.lld`lld::macho::BitcodeFile::parse() + 2056
frame #9: 0x0000000100837168 ld64.lld`lld::macho::SymbolTable::addLazyObject(llvm::StringRef, lld::macho::InputFile&) + 592
frame #10: 0x00000001007d9ecc ld64.lld`lld::macho::BitcodeFile::parseLazy() + 504
frame #11: 0x00000001007d967c ld64.lld`lld::macho::BitcodeFile::BitcodeFile(llvm::MemoryBufferRef, llvm::StringRef, unsigned long long, bool, bool) + 3960
frame #12: 0x000000010078109c ld64.lld`addFile(llvm::StringRef, LoadType, bool, bool, bool, bool) + 2464
frame #13: 0x0000000100777da8 ld64.lld`lld::macho::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 64400
frame #14: 0x00000001000022fc ld64.lld`lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) + 3068
frame #15: 0x00000001000013d0 ld64.lld`lld_main(int, char**) + 696
frame #16: 0x000000010b1c108c dyld`start + 520
If you link with -t -why_load
, it prints
...
obj/content/shell/content_shell_app/shell_crash_reporter_client.o
__ZN7content24ShellCrashReporterClientC1Ev forced load of obj/content/shell/content_shell_app/shell_crash_reporter_client.o
obj/content/shell/content_shell_app/shell_crash_reporter_client.o
__ZTVN7content24ShellCrashReporterClientE forced load of obj/content/shell/content_shell_app/shell_crash_reporter_client.o
So the file forces a load of itself!
We should definitely do bd448f0 in the MachO port (see also D106293), but doing just that isn't enough: We hit some other assert later on then.
Need to understand what's going on first and make a reduced repro.