Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
4.2k
stars
516
forks
source link
Some but not all void* values explode when accessed in lua. #1402
Open
onelumin opened 2 years ago
I have a little carrier struct like this:
With a usertype binding:
If I default construct it in lua like this:
I get:
userdata: NULL
. great!But when id happens to = 0x612f93000000004e before calling id for instance,
I get:
libc++abi: terminating due to uncaught foreign exception
. not so great.In my case, this void* happens to point into some vulkan gpu memory magic which should never be interacted with by any lua stuff.
This happens in
sol::stack::unqualified_pusher<void*, void>::push(lua_State*, void*)
Since the error depends on the value of the pointer, can I stop sol from touching it completely?