Displaying 1 result from an estimated 1 matches for "__cxa_finalize_ranges".
2017 Nov 19
2
JIT and atexit crash
...on at some address 0xdeadbeef. Everything is fine, but when the host program (the one that JITs C++ code) shuts down, then I see a crash:
error: memory read failed for 0xdeadbeef
With the following backtrace:
* frame #0: 0x000000010b70b7a0
frame #1: 0x00007fff8ae0c17f libsystem_c.dylib`__cxa_finalize_ranges + 339
frame #2: 0x00007fff8ae0c4b2 libsystem_c.dylib`exit + 55
frame #3: 0x00007fff8ad7723c libdyld.dylib`start + 8
After some debugging I think I understand what goes wrong.
Here is my hypothesis:
JIT allocates and maps some memory for the execution. Some function X at address 0xdeadbeef...