PMunch / futhark

Automatic wrapping of C headers in Nim
MIT License
374 stars 20 forks source link

0.13.3: SIGSEGV #116

Open inv2004 opened 1 month ago

inv2004 commented 1 month ago
when isMainModule:
  import futhark

  importc:
    path: "/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include"
    rename "u_int", "u_intt"
    "sys/sysctl.h"

  echo "a"

0.13.2: a 0.13.3:

/Users/u/ttop/src/ttop/procfs.nim(4, 8) [DuplicateModuleImport]
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
PMunch commented 1 month ago

It shouldn't make a difference, but could you try to remove the : after path? It's not supposed to be there.

Not sure what might be causing this, and without a Mac to debug on it would be very hard for me to find out. Does Futhark generate bindings correctly? Or is this the Nim compiler crashing?

PMunch commented 4 weeks ago

I fixed a SIGSEGV bug today with the 0.13.4 release, could you try that and see if it is the same one?