Ciprian Tomoiaga wrote: > I have a C function containing OpenMP clause which I call with ffi. On my > machine, the program terminates with a segmentation fault. However, it > works without a problem on a Mac and on another machine. The most likely cause is the dreaded pthread issue: the main executable must be compiled/linked with -pthread (note: this is not the same as -lpthread!). Otherwise a shared library which is loaded later on and uses threads may cause a crash. The easiest way to test this hypothesis is to rebuild LuaJIT with: make TARGET_FLAGS=-pthread ... and then try again. --Mike