Join GitHub today
sql/dll.test.lua fails sporadically #4427
This looks quite similar to this issue (same backtrace, same assertion): #1099
I have taken a quick look at this based on @sergos request.
You are doing something really not supported by LuaJIT. You mix Lua API and FFI and you create sandwich stacks like this.
In this particular case you call
In general JIT recorder wants to assume that if you exited Lua world through FFI you are not re-entering Lua world again. That's because JIT generated code in general expects to be leaf of the execution. There is special machinery in that tries to detect situations like
There is no such check on re-entering through the API - like what you are doing here. So violation of the assumption simply crashes the recorder.
As a workaround I suggest blacklisting
As a real fix I guess LuaJIT should be patched to detect this sort of re-entrancy through the API - at least when asserts are on.
Yes, I think you can sprinkle the relevant parts from