-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Working with jaylib for the first time and it seems like math_cfuns
being a constant causes an immediate sigsev on macos.
Reproduction steps:
(on a m2 macbook air)
jpm install jaylib
janet
Janet 1.39.1-homebrew macos/aarch64/clang - '(doc)' for help
repl:1:> (import jaylib)
fish: Job 1, 'janet' terminated by signal SIGSEGV (Address boundary error)
I then cloned jaylib locally and used lldb
to do some debugging. Didn't really find anything helpful since I was too lazy to rebuild janet with debug symbols. I found, by slowly reducing the janet_cfuns
calls in main.c
that by not including the math functions it would import without crashing. Commented out the whole contents of math_cfuns
and it still crashed. I noticed the only major difference between the math functions and everything else was that math_cfuns
was a constant. By removing the constant declaration it compiled, and imported successfully.
Not sure I know enough about C to understand why this might be happening but since it seemed consistently reproducible and the math bindings look relatively new I wanted to file an issue. Let me know if there's anything else I can include to help debug this.