Victor Bombi
2014-06-22 09:41:29 UTC
Hello,
I define a function to be called as a callback inside a luaLanes lane. I
send it to the main lua_state with a linda in order to use it as an argument
to a ffi C function. In this function I print the arguments it receives. The
C function is called several times in a loop. If io.read"*l" is used after
the C function call it prints: cdata<struct ReplyAddress *>: 0x023f2128
cdata<char *>: 0x0472de50 72 . But if io.read"*l" is removed then it
prints: function: builtin#18 function: builtin#18 function:
builtin#18 and luajit crashes. Just in case I have used jit.off() in the
main lua_state and in the lanes lua_state.
What is happening? What can be done?
Thanks
victor
I define a function to be called as a callback inside a luaLanes lane. I
send it to the main lua_state with a linda in order to use it as an argument
to a ffi C function. In this function I print the arguments it receives. The
C function is called several times in a loop. If io.read"*l" is used after
the C function call it prints: cdata<struct ReplyAddress *>: 0x023f2128
cdata<char *>: 0x0472de50 72 . But if io.read"*l" is removed then it
prints: function: builtin#18 function: builtin#18 function:
builtin#18 and luajit crashes. Just in case I have used jit.off() in the
main lua_state and in the lanes lua_state.
What is happening? What can be done?
Thanks
victor