Bad light usedata pointer LuaJIT 64 bits again
sonoro1234 opened this issue · comments
local lanes = require"lanes"
returns
C:\supercolliderrepos\aaabuildlua2sctest64\install\luajit.exe: bad light userdata pointer
stack traceback:
[C]: at 0x618c44d0
[C]: in function 'require'
...colliderrepos\aaabuildlua2sctest64\install\lua\lanes.lua:38: in main chunk
[C]: in function 'require'
C:\Lua2SCinstalled\test.lua:1: in main chunk
[C]: at 0x00402070
I cant bisect properly because all happened when CMakeList was temporaly broken (I can only build with cmake) But it should be around commit 7b4f59c
All I can think of is that LuaJIT uses some bits of the light userdata value for internal purposes, and expects all provided values with those bits cleared. See uniquekey.h
. Maybe for some reason the masking is wrong or the detection incorrect...
Yes,
LuaJIT/LuaJIT#450 (comment)
Ok I see
#if defined LUA_JITLIBNAME // building against LuaJIT headers, add some LuaJIT-specific libs
So it is no runtime detection but compile time if using LuaJIT headers, I must recompile.
That was the problem!!!
Thanks!!