mold
mold copied to clipboard
[macOS] program segfaults after linking via mold
Using the latest build of mold (694f973dc50d2d7f207849cf64f6cc1ddd00a987), I compiled and linked a non trivial program, and the link finished successfully, but after launching the program, the program crashed with segmentation fault.
Since this program is too large, I've no idea which part caused the issue yet and don't have a minimum program to reproduce it so far. I am not sure if this is helpful but here is the crash report from macOS:
Process: rpc-tests [54044]
Path: /Users/USER/*/rpc-tests
Identifier: rpc-tests
Version: ???
Code Type: X86-64 (Native)
Parent Process: Exited process [54043]
Responsible: iTerm2 [1608]
User ID: 501
Date/Time: 2022-08-26 04:21:58.533 +08:00
OS Version: macOS 12.5 (21G72)
Report Version: 12
Anonymous UUID: 29D3CA2A-AA98-F273-02CB-2724729BD671
Sleep/Wake UUID: F12F43F5-1444-4579-BEEC-6F38D271E064
Time Awake Since Boot: 14000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000001
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [54044]
VM Region Info: 0x1 is not in any region. Bytes before following region: 140737487544319
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
VM_ALLOCATE 7ffffff3a000-7ffffff3b000 [ 4K] r-x/r-x SM=ALI
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 rpc-tests 0x00000001084060d2 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string<std::nullptr_t>(char const*) + 2
1 rpc-tests 0x0000000108440d50 __cxx_global_var_init + 64
2 dyld 0x0000000117f57e4f invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
3 dyld 0x0000000117f7e911 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129
4 dyld 0x0000000117f75e26 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 557
5 dyld 0x0000000117f44db3 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
6 dyld 0x0000000117f75bb7 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
7 dyld 0x0000000117f7e342 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118
8 dyld 0x0000000117f7e5b4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386
9 dyld 0x0000000117f57d82 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
10 dyld 0x0000000117f57f0e dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
11 dyld 0x0000000117f57fb2 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
12 dyld 0x0000000117f6b826 dyld4::APIs::runAllInitializersForMain() + 222
13 dyld 0x0000000117f4938d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3443
14 dyld 0x0000000117f484e4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000001 rbx: 0x00007ff7b7af7720 rcx: 0x00007ff857d85120 rdx: 0x0000000000000000
rdi: 0x000000010895dd08 rsi: 0x000000010873aba2 rbp: 0x00007ff7b7af7710 rsp: 0x00007ff7b7af76f8
r8: 0x0000000000073509 r9: 0xffffffff00000000 r10: 0x00007ff857d85118 r11: 0x0000000117f7e890
r12: 0x00007ff7b7af7c00 r13: 0x0000000108405558 r14: 0x0000000108440d10 r15: 0x000000010903d060
rip: 0x00000001084060d2 rfl: 0x0000000000010246 cr2: 0x0000000000000001
Thread 0 instruction stream:
00 00 00 48 63 4d fc 48-8d 05 00 00 00 00 48 c7 ...HcM.H......H.
04 c8 00 00 00 00 8b 45-fc 83 c0 01 89 45 fc e9 .......E.....E..
a1 ff ff ff 48 8b 7d d8-48 89 c1 89 d0 48 89 4d ....H.}.H....H.M
f0 89 45 ec e8 00 00 00-00 e9 7e 00 00 00 48 8d ..E.......~...H.
7d e0 48 8d 35 00 00 00-00 e8 00 00 00 00 48 8b }.H.5.........H.
05 00 00 00 00 48 89 45-d0 48 83 f8 00 0f 84 17 .....H.E.H......
[00]00 00 48 8b 7d d0 e8-00 00 00 00 e9 00 00 00 ...H.}.......... <==
00 48 8b 7d d0 e8 00 00-00 00 48 c7 05 fc ff ff .H.}......H.....
ff 00 00 00 00 48 8d 7d-e0 e8 00 00 00 00 48 83 .....H.}......H.
c4 30 5d c3 48 8b 7d d0-48 89 c1 89 d0 48 89 4d .0].H.}.H....H.M
f0 89 45 ec e8 00 00 00-00 48 8d 7d e0 e8 00 00 ..E......H.}....
00 00 e9 00 00 00 00 e9-00 00 00 00 48 8b 7d f0 ............H.}.
Binary Images:
0x0 - 0x0 +??? (???) <00000000-0000-0000-0000-000000000000> ???
0x108405000 - 0x108951000 +rpc-tests (???) <2733C5D1-0204-E811-3645-8DB450FCE52C> /Users/USER/*/rpc-tests
0x117f43000 - 0x117faf000 dyld (???) <F71FB3CA-5FCC-3577-9457-B047888A46D1> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=403.3M resident=0K(0%) swapped_out_or_unallocated=403.3M(100%)
Writable regions: Total=587.1M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=587.1M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 1
MALLOC 137.1M 10
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
STACK GUARD 4K 1
Stack 64.0M 1
VM_ALLOCATE 8K 2
__DATA 2958K 120
__DATA_CONST 5257K 85
__DATA_DIRTY 209K 50
__LINKEDIT 317.7M 7
__TEXT 85.6M 132
__UNICODE 592K 1
dyld private memory 1024K 1
shared memory 8K 1
=========== ======= =======
TOTAL 998.3M 418
TOTAL, minus reserved VM space 614.3M 418
- The program is a Catch2 (https://github.com/catchorg/Catch2) based test program (Catch2 will compile all your tests into a test binary to run).
- I don't launch the test program directly, after compilation and linking the program, cmake will automatically launch the test binary to collect all the tests available in the binary so it executes a Catch2 related code path to get all available tests in the binary, during this period, the program crashed.
- So the crash is related with a Catch2 code path along with the static initialization code path of my program logic, I think it is more likely cause by the latter, that some of my program's static initialization triggered the issue and caused the crash (from the crash log, it reported the error occurred during
findAndRunAllInitializers). It may be related with this one https://github.com/rui314/mold/issues/657 but probably for a different reason.
The program is non trivial (100k lines of code) and all its sub modules get correctly linked until this module. Do you have any idea how I can troubleshoot and narrow down such an issue? Thanks.
Env:
- macOS 12.5
- mold (694f973dc50d2d7f207849cf64f6cc1ddd00a987)
- my program is written using C++17 (not sure if it is relevant)
I found this issue is probably caused by some non deterministic problem. I tried to narrow down the issue by removing some test source code from my code base and re-compile and re-link, but found after removing just 1 file and the program worked. But even if I put back the removed source code and re-compile, the issue didn't occur any more.
Then I tried other ways such as adding a white space to a source file to trigger re-compile/re-link, and the issue didn't occur any more.
So it occurred only once in my first attempt to link this program but never occur any more (actually as I said above, the linking succeeded but the program crashed after launching).
It is probably there is still one issue in mold causing this problem since I didn't observe such an issue with other linkers (mainly Apple's ld and zld)
Do you have any idea how I could proceed to narrow down this issue? Thanks.
After several attempts (< 10 attempts), the issue occurred again. But so far I have no idea how this gets triggered.
I wonder if the flakiness comes from multi-threading. What if you add -Wl,-thread_count,1 to disable multi-threading?
I use CMAKE_EXE_LINKER_FLAGS (https://cmake.org/cmake/help/latest/variable/CMAKE_EXE_LINKER_FLAGS.html) to specify the additional flags, is it expected to work?
CMAKE_EXE_LINKER_FLAGS="-fuse-ld=/usr/local/bin/ld64.mold -Wl,-thread_count,1"
I found after adding this flag, it didn't avoid the crash, but made the crashes more frequent.
- before adding this flag, compiling 40+ binaries in the project may cause 1 crash mentioned above.
- after adding this flag, compiling 40+ binaries in the project will cause 5+ crashes, with three different errors (Illegal instruction/Segmentation fault/Bus error), all linkings finished successfully but program crashed after launching.
Bus error crash report:
Process: event-processor-tests [59064]
Path: /Users/USER/*/event-processor-tests
Identifier: event-processor-tests
Version: ???
Code Type: X86-64 (Native)
Parent Process: cmake [59063]
Responsible: iTerm2 [1608]
User ID: 501
Date/Time: 2022-08-26 16:19:42.679 +08:00
OS Version: macOS 12.5 (21G72)
Report Version: 12
Anonymous UUID: 29D3CA2A-AA98-F273-02CB-2724729BD671
Sleep/Wake UUID: 21BC6916-8426-436A-93C5-A61A6E4630B7
Time Awake Since Boot: 48000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000010e2401c7
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [59064]
VM Region Info: 0x10e2401c7 is in 0x10e23f000-0x10fa2b000; bytes after start: 4551 bytes before end: 25079352
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
---> __TEXT 10e23f000-10fa2b000 [ 23.9M] r-x/r-x SM=COW ...ocessor-tests
__DATA_CONST 10fa2b000-10fa4f000 [ 144K] r--/rw- SM=COW ...ocessor-tests
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 event-processor-tests 0x000000010e240076 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string<std::nullptr_t>(char const*) + 22
1 event-processor-tests 0x000000010e25ab00 __cxx_global_var_init + 64
2 dyld 0x0000000114606e4f invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
3 dyld 0x000000011462d911 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129
4 dyld 0x0000000114624e26 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 557
5 dyld 0x00000001145f3db3 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
6 dyld 0x0000000114624bb7 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
7 dyld 0x000000011462d342 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118
8 dyld 0x000000011462d5b4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386
9 dyld 0x0000000114606d82 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
10 dyld 0x0000000114606f0e dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
11 dyld 0x0000000114606fb2 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
12 dyld 0x000000011461a826 dyld4::APIs::runAllInitializersForMain() + 222
13 dyld 0x00000001145f838d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3443
14 dyld 0x00000001145f74e4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010e24006f rbx: 0x00007ff7b1cbbc00 rcx: 0x000000010e24006f rdx: 0x000000010e25ab00
rdi: 0x000000010fa50108 rsi: 0x0000000000000000 rbp: 0x00007ff7b1cbbbf0 rsp: 0x00007ff7b1cbbbd0
r8: 0x000000000013eb0a r9: 0xffffffff00000000 r10: 0x00007ff857d85118 r11: 0x000000011462d890
r12: 0x00007ff7b1cbc0e0 r13: 0x000000010e23f558 r14: 0x000000010e25aac0 r15: 0x0000000111527060
rip: 0x000000010e240076 rfl: 0x0000000000010202 cr2: 0x000000010e2401c7
Thread 0 instruction stream:
1f 00 55 48 89 e5 48 83-ec 10 48 89 7d f8 48 89 ..UH..H...H.}.H.
75 f0 48 8b 7d f8 48 8b-75 f0 e8 00 00 00 00 48 u.H.}.H.u......H
83 c4 10 5d c3 66 2e 0f-1f 84 00 00 00 00 00 0f ...].f..........
1f 00 55 48 89 e5 48 83-ec 20 48 89 7d f8 89 75 ..UH..H.. H.}..u
f4 48 89 55 e8 48 8b 7d-f8 48 89 7d e0 8b 75 f4 .H.U.H.}.H.}..u.
48 8b 55 e8 e8 00 00 00-00 48 8b 45 e0 48 89 c1 H.U......H.E.H..
[48]89 88 58 01 00 00 48-83 c4 20 5d c3 0f 1f 44 H..X...H.. ]...D <==
00 00 55 48 89 e5 48 83-ec 20 48 89 7d f8 89 75 ..UH..H.. H.}..u
f4 48 89 55 e8 48 8b 7d-f8 8b 75 f4 48 8b 55 e8 .H.U.H.}..u.H.U.
e8 00 00 00 00 48 83 c4-20 5d c3 0f 1f 80 00 00 .....H.. ]......
00 00 55 48 89 e5 48 83-ec 20 48 89 7d f8 89 75 ..UH..H.. H.}..u
f4 48 89 55 e8 48 8b 7d-f8 8b 75 f4 48 8b 55 e8 .H.U.H.}..u.H.U.
Binary Images:
0x10e23f000 - 0x10fa2b000 +event-processor-tests (???) <3ECC8992-1DF2-0570-76B2-C43CA95F680A> /Users/USER/*/event-processor-tests
0x1145f2000 - 0x11465e000 dyld (???) <F71FB3CA-5FCC-3577-9457-B047888A46D1> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=441.8M resident=0K(0%) swapped_out_or_unallocated=441.8M(100%)
Writable regions: Total=587.1M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=587.1M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 1
MALLOC 137.1M 10
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
STACK GUARD 4K 1
Stack 64.0M 1
VM_ALLOCATE 8K 2
__DATA 3003K 119
__DATA_CONST 5350K 84
__DATA_DIRTY 209K 50
__LINKEDIT 337.7M 7
__TEXT 104.1M 131
__UNICODE 592K 1
dyld private memory 1024K 1
shared memory 8K 1
=========== ======= =======
TOTAL 1.0G 415
TOTAL, minus reserved VM space 652.9M 415
Seg fault crash report
Process: metastore-tests [59060]
Path: /Users/USER/*/metastore-tests
Identifier: metastore-tests
Version: ???
Code Type: X86-64 (Native)
Parent Process: cmake [59059]
Responsible: iTerm2 [1608]
User ID: 501
Date/Time: 2022-08-26 16:19:40.970 +08:00
OS Version: macOS 12.5 (21G72)
Report Version: 12
Anonymous UUID: 29D3CA2A-AA98-F273-02CB-2724729BD671
Sleep/Wake UUID: 21BC6916-8426-436A-93C5-A61A6E4630B7
Time Awake Since Boot: 48000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [59060]
VM Region Info: 0 is not in any region. Bytes before following region: 4331655168
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 1022fd000-103b99000 [ 24.6M] r-x/r-x SM=COW ...tastore-tests
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x0000000000000000 0x0 + 0
1 dyld 0x000000010d308e4f invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
2 dyld 0x000000010d32f911 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129
3 dyld 0x000000010d326e26 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 557
4 dyld 0x000000010d2f5db3 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
5 dyld 0x000000010d326bb7 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
6 dyld 0x000000010d32f342 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118
7 dyld 0x000000010d32f5b4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386
8 dyld 0x000000010d308d82 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
9 dyld 0x000000010d308f0e dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
10 dyld 0x000000010d308fb2 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
11 dyld 0x000000010d31c826 dyld4::APIs::runAllInitializersForMain() + 222
12 dyld 0x000000010d2fa38d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3443
13 dyld 0x000000010d2f94e4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000001 rbx: 0x00007ff7bdbfe6c0 rcx: 0x00007ff857d85120 rdx: 0x0000000000000000
rdi: 0x00007ff7bdbfe698 rsi: 0x000000000314bc0e rbp: 0x00007ff7bdbfe6b0 rsp: 0x00007ff7bdbfe6a0
r8: 0x000000000013eab4 r9: 0xffffffff00000000 r10: 0x00007ff857d85118 r11: 0x000000010d32f890
r12: 0x00007ff7bdbfeba0 r13: 0x00000001022fd558 r14: 0x000000010231ff90 r15: 0x0000000105d41060
rip: 0x0000000000000000 rfl: 0x0000000000010206 cr2: 0x0000000000000000
Binary Images:
0x0 - 0x0 +??? (???) <00000000-0000-0000-0000-000000000000> ???
0x10d2f4000 - 0x10d360000 dyld (???) <F71FB3CA-5FCC-3577-9457-B047888A46D1> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=196.9M resident=0K(0%) swapped_out_or_unallocated=196.9M(100%)
Writable regions: Total=587.1M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=587.1M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 1
MALLOC 137.1M 10
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
STACK GUARD 4K 1
Stack 64.0M 1
VM_ALLOCATE 8K 2
__DATA 1330K 42
__DATA_CONST 454K 37
__DATA_DIRTY 58K 22
__LINKEDIT 166.4M 6
__TEXT 30.5M 46
dyld private memory 1024K 1
shared memory 8K 1
=========== ======= =======
TOTAL 784.9M 176
TOTAL, minus reserved VM space 400.9M 176
Illegal instruction
Process: event-ingestor-tests [59035]
Path: /Users/USER/*/event-ingestor-tests
Identifier: event-ingestor-tests
Version: ???
Code Type: X86-64 (Native)
Parent Process: Exited process [59034]
Responsible: iTerm2 [1608]
User ID: 501
Date/Time: 2022-08-26 16:19:33.615 +08:00
OS Version: macOS 12.5 (21G72)
Report Version: 12
Anonymous UUID: 29D3CA2A-AA98-F273-02CB-2724729BD671
Sleep/Wake UUID: 21BC6916-8426-436A-93C5-A61A6E4630B7
Time Awake Since Boot: 48000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [59035]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 event-ingestor-tests 0x0000000100bfd1d0 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string<std::nullptr_t>(char const*) + 0
1 event-ingestor-tests 0x0000000100c05790 __cxx_global_var_init + 64
2 dyld 0x000000011fa2fe4f invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
3 dyld 0x000000011fa56911 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129
4 dyld 0x000000011fa4de26 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 557
5 dyld 0x000000011fa1cdb3 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
6 dyld 0x000000011fa4dbb7 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
7 dyld 0x000000011fa56342 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118
8 dyld 0x000000011fa565b4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386
9 dyld 0x000000011fa2fd82 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
10 dyld 0x000000011fa2ff0e dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
11 dyld 0x000000011fa2ffb2 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
12 dyld 0x000000011fa43826 dyld4::APIs::runAllInitializersForMain() + 222
13 dyld 0x000000011fa2138d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3443
14 dyld 0x000000011fa204e4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000001 rbx: 0x00007ff7bf2ffbc0 rcx: 0x00007ff857d85120 rdx: 0x0000000000000000
rdi: 0x00000001084d4e88 rsi: 0x0000000105b06ea2 rbp: 0x00007ff7bf2ffbb0 rsp: 0x00007ff7bf2ffb98
r8: 0x000000000013e9e5 r9: 0xffffffff00000000 r10: 0x00007ff857d85118 r11: 0x000000011fa56890
r12: 0x00007ff7bf3000a0 r13: 0x0000000100bfb5a8 r14: 0x0000000100c05750 r15: 0x000000011043f060
rip: 0x0000000100bfd1d0 rfl: 0x0000000000010202 cr2: 0x0000000100bfd1d0
Thread 0 instruction stream:
85 14 fc ff ff 89 85 d0-fd ff ff 48 8d b5 d0 fd ...........H....
ff ff e8 00 00 00 00 48-89 85 08 fc ff ff e9 00 .......H........
00 00 00 e8 00 00 00 00-89 85 04 fc ff ff e9 00 ................
00 00 00 8b b5 04 fc ff-ff 48 8b bd 08 fc ff ff .........H......
e8 00 00 00 00 48 89 85-f8 fb ff ff e9 00 00 00 .....H..........
00 bf 30 00 00 00 e8 00-00 00 00 88 85 f7 fb ff ..0.............
[ff]e9 00 00 00 00 48 8b-bd f8 fb ff ff 8a 85 f7 ......H......... <==
fb ff ff 88 85 c8 fd ff-ff 48 8d b5 c8 fd ff ff .........H......
e8 00 00 00 00 48 89 85-e8 fb ff ff e9 00 00 00 .....H..........
00 48 8b bd e8 fb ff ff-be 20 00 00 00 e8 00 00 .H....... ......
00 00 48 89 85 e0 fb ff-ff e9 00 00 00 00 48 8b ..H...........H.
bd e0 fb ff ff 48 8b 85-78 fd ff ff 48 8b 40 08 .....H..x...H.@.
Binary Images:
0x100bfb000 - 0x1083c3000 +event-ingestor-tests (???) <0FB64C59-EEBF-FDDB-442D-099681965CD4> /Users/USER/*/event-ingestor-tests
0x11fa1b000 - 0x11fa87000 dyld (???) <F71FB3CA-5FCC-3577-9457-B047888A46D1> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=842.4M resident=0K(0%) swapped_out_or_unallocated=842.4M(100%)
Writable regions: Total=589.3M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=589.3M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 1
MALLOC 137.1M 10
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
STACK GUARD 4K 1
Stack 64.0M 1
VM_ALLOCATE 8K 2
__DATA 5518K 122
__DATA_CONST 6313K 86
__DATA_DIRTY 209K 50
__LINKEDIT 642.0M 8
__TEXT 200.4M 134
__UNICODE 592K 1
dyld private memory 1024K 1
shared memory 8K 1
=========== ======= =======
TOTAL 1.4G 424
TOTAL, minus reserved VM space 1.0G 424