Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lua): turn off all optimizations in debug mode
I'm on macOS right now, so not sure how this will look in GCC, but at least with clang/lldb we find the smoking gun pretty directly here. First, without `-O0` lldb --file nvim (lldb) r Process 33400 stopped * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x7669746967750013) frame #0: 0x0000000103411c08 commandt.so`commandt_calculate_match + 52 commandt.so`commandt_calculate_match: -> 0x103411c08 <+52>: ldr x8, [x8, #0x8] 0x103411c0c <+56>: adds x8, x8, #0x1 0x103411c10 <+60>: cset w8, eq 0x103411c14 <+64>: mov w9, #0x1 Target 0: (nvim) stopped. (lldb) bt * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x29) * frame #0: 0x0000000103411c08 commandt.so`commandt_calculate_match + 52 frame #1: 0x0000000103413174 commandt.so`match_thread + 252 frame #2: 0x00000001be24826c libsystem_pthread.dylib`_pthread_start + 148 Same with `-O0`: Process 33773 stopped * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x7669746967750093) frame #0: 0x0000000103411c08 commandt.so`commandt_calculate_match(haystack=0x766974696775008b, matcher=0x0000600002166800) at match.c:132:38 129 matchinfo_t m; 130 /* long i; */ 131 float score = 1.0; -> 132 int compute_bitmasks = haystack->bitmask == UNSET_BITMASK; 133 m.haystack = haystack; 134 m.needle_p = matcher->needle; 135 m.needle_length = matcher->needle_length; Target 0: (nvim) stopped.
- Loading branch information