Nim
Nim copied to clipboard
Nil reference crash missing a stack trace
What happened?
This POC is a NIL access and should show a stack trace. It doesn't do this on my M1 mac. However, on the playground it does work, leading me to believe it might be a Mac or M1 specific bug.
import segfaults
type my_object = ref object
my_field: int
proc my_func() =
var test: my_object
echo test.my_field
my_func()
Nim Version
1.6.6
Current Standard Output Logs
Error: execution of an external program failed: '/Users/projects/bug/tests '
Expected Standard Output Logs
Actual stack trace
Possible Solution
No response
Additional Information
No response
segfaults does not work on ARM and nobody knows how to fix it.