The unitttests that I have just put in crash spectacularly with an access violation. I built the code with LDC for Aarch64 / OSX and I fired up lldb. I now have to learn lldb quick. (BTW Where can I get an x86 / linux build of lldb or similar ?)

This is the stack dump, and I could do with some help decoding parts of it

⋊> cecil@janet-mac-mini ⋊> ~/a/src clear; ./got 14:01:26 0 asm_parse 0x0000000102a157e4 _D4core7runtime18runModuleUnitTestsUZ19unittestSegvHandlerUNbiPSQCk3sys5posix6signal9siginfo_tPvZv + 56 1 libsystem_platform.dylib 0x00000001a06f2a24 _sigtramp + 56 2 asm_parse 0x000000010297ed88 _D4core8internal5array9appending__T15_d_arrayappendTHTAuTuZQyFNaNbNcNeMNkKQuMQxZQBa + 56
./got: line 7: 18387 Bus error: 10           ./asm_parse
⋊> cecil@janet-mac-mini ⋊> ~/a/src sudo lldb asm_parse 14:02:49
Password:
(lldb) target create "asm_parse"
Current executable set to '/Users/cecil/asm_parse/src/asm_parse' (arm64).
(lldb) run
Process 18406 launched: '/Users/cecil/asm_parse/src/asm_parse' (arm64)
Process 18406 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffff6) frame #0: 0x00000001a06f2860 libsystem_platform.dylib`_platform_memmove + 544
libsystem_platform.dylib`:
->  0x1a06f2860 <+544>: ldp    q0, q1, [x1, #-0x20]
    0x1a06f2864 <+548>: sub    x1, x1, #0x20
    0x1a06f2868 <+552>: subs   x2, x2, #0x20
    0x1a06f286c <+556>: b.hi   0x1a06f2858               ; <+536>
Target 0: (asm_parse) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffff6) * frame #0: 0x00000001a06f2860 libsystem_platform.dylib`_platform_memmove + 544 frame #1: 0x0000000100006d88 asm_parse`_D4core8internal5array9appending__T15_d_arrayappendTHTAuTuZQyFNaNbNcNeMNkKQuMQxZQBa + 56 frame #2: 0x000000010000b1fc asm_parse`_D9asm_parse__T20AsmTransformTemplateTuZ21__unittest_L1541_C1_1FZv + 628 frame #3: 0x000000010006b9b8 asm_parse`asm_parse.__unittest + 36 frame #4: 0x000000010009d83c asm_parse`_D4core7runtime18runModuleUnitTestsUZ14__foreachbody6MFPS6object10ModuleInfoZi + 56 frame #5: 0x00000001000ac620 asm_parse`_D2rt5minfo17moduleinfos_applyFMDFyPS6object10ModuleInfoZiZ14__foreachbody2MFKSQCz19sections_elf_shared3DSOZi + 68 frame #6: 0x00000001000acee0 asm_parse`_D2rt19sections_elf_shared3DSO7opApplyFMDFKSQBqQBqQyZiZi + 56 frame #7: 0x00000001000ac5b0 asm_parse`_D2rt5minfo17moduleinfos_applyFMDFyPS6object10ModuleInfoZiZi + 32 frame #8: 0x00000001000a21a4 asm_parse`_D6object10ModuleInfo7opApplyFMDFPSQBhQBdZiZi + 32 frame #9: 0x000000010009d6b0 asm_parse`runModuleUnitTests + 184 frame #10: 0x00000001000a6518 asm_parse`_D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv + 32
    frame #11: 0x00000001000a641c asm_parse`_d_run_main2 + 376
    frame #12: 0x00000001000a6288 asm_parse`_d_run_main + 148
    frame #13: 0x00000001a036bf28 dyld`start + 2236
(lldb)

Reply via email to