Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Nil reference crash missing a stack trace

Open Stuffe opened this issue 3 years ago • 1 comments

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

Stuffe avatar Sep 04 '22 04:09 Stuffe

segfaults does not work on ARM and nobody knows how to fix it.

Araq avatar Sep 07 '22 18:09 Araq