You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run it with zig test main.zig. The exact size of the foo array required to cause the crash may change based off of what system you are using.
Output:
Robert@Roberts-MacBook-Pro-2 ~/z/d/src (master)> zig test reproduce.zig
Test [1/1] test.stack... error: the following testcommand crashed:
/Users/Robert/zig/dev/zig-cache/o/149dee587edb8951878581bc06128f82/test
Additionally, using a debugger provides very little useful information on what caused the crash
Robert@Roberts-MacBook-Pro-2 ~/z/d/src (master)> lldb /Users/Robert/zig/dev/zig-cache/o/149dee587edb8951878581bc06128f82/test
(lldb) target create "/Users/Robert/zig/dev/zig-cache/o/149dee587edb8951878581bc06128f82/test"
Current executable set to '/Users/Robert/zig/dev/zig-cache/o/149dee587edb8951878581bc06128f82/test' (x86_64).
(lldb) run
Process 6881 launched: '/Users/Robert/zig/dev/zig-cache/o/149dee587edb8951878581bc06128f82/test' (x86_64)
Process 6881 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ff7bf6ffec0)
frame #0: 0x00000001000b3364 test`__zig_probe_stack at stack_probe.zig:53:13 [opt]
50 switch (arch) {
51 .x86_64 => {
52 // %rax = probe length, %rsp = stack pointer
-> 53 asm volatile (
54 \\ push %%rcx
55 \\ mov %%rax, %%rcx
56 \\cmp $0x1000,%%rcx
warning: test was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ff7bf6ffec0)* frame #0: 0x00000001000b3364 test`__zig_probe_stack at stack_probe.zig:53:13 [opt]
frame #1: 0x0000000100007ce4 test`test_runner.mainTerminal at test_runner.zig:176:28
frame #2: 0x0000000100000e29 test`test_runner.main at test_runner.zig:36:28
frame #3: 0x00000001000009af test`main [inlined] start.callMain at start.zig:564:22
frame #4: 0x00000001000009aa test`main [inlined] start.initEventLoopAndCallMain at start.zig:508:5
frame #5: 0x00000001000009aa test`main at start.zig:458:36
frame #6: 0x000000010000094d test`main(c_argc=1, c_argv=0x00007ff7bfeff908, c_envp=0x00007ff7bfeff918) at start.zig:473:101
frame #7: 0x00007ff802941310 dyld`start + 2432
(lldb)
Expected Output
Ideally there would be some sort of details as to what caused the crash, and what line of my code caused the crash.
The text was updated successfully, but these errors were encountered:
Zig Version
0.11.0
Steps to Reproduce and Observed Output
My system details
Here is example code that will cause this crash
Run it with
zig test main.zig
. The exact size of thefoo
array required to cause the crash may change based off of what system you are using.Output:
Additionally, using a debugger provides very little useful information on what caused the crash
Expected Output
Ideally there would be some sort of details as to what caused the crash, and what line of my code caused the crash.
The text was updated successfully, but these errors were encountered: