-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV when using ffi.string with char[?] VLA #134
Comments
Maybe LuaJIT tries to initialize my array with entirety of passed data, i.e. all characters of string |
Interesting, I do think it is a bug. |
Yes, you are right. It's indeed the behaviour of the official LuaJIT. I found the source code here: I have created a issue in official LuaJIT repo: LuaJIT/LuaJIT#758 Thanks for your report, it's interesting anyway. |
Reproduction case:
docker run --rm -it -v "$(pwd):/work" openresty/openresty:1.19.9.1-buster-fat bash -c 'resty /work/ffi_sigsegv.lua; echo $?'
Run a few times if it prints "ok", on my system it's failing nine times out of ten. I tried running it via
luajit
but then I didn't manage to make it crash.The text was updated successfully, but these errors were encountered: