No crash. Showing an error if those lines that make it crash are wrong.
Possible Solution
I have a workaround but it doesn't fix what causes this crash.
Additional Information
Error is caused by lines 132 and 184 in syslocks.nim. Trying to use sizeof with these two imported structs fail.
My workaround is as follows:
# I declare the `sizeof` as an imported variable
var sizeofSysLockObj {.importc:"sizeof(pthread_mutex_t)",nodecl.}: csize_t
# Then I use it instead of csize_t(sizeof(SysLockObj))
L = cast[SysLock](c_malloc(sizeofSysLockObj))
# and same thing with SysCondObj
Specification
Compile anything for iOS with threads on
Example
Run
nim c -c --os:ios --threads:on anything.nim
with any file.Actual Output
Expected Output
No crash. Showing an error if those lines that make it crash are wrong.
Possible Solution
I have a workaround but it doesn't fix what causes this crash.
Additional Information
Error is caused by lines 132 and 184 in
syslocks.nim
. Trying to usesizeof
with these two imported structs fail.My workaround is as follows: