-
Notifications
You must be signed in to change notification settings - Fork 182
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
Busted and LuaJIT are not playing well together. #369
Comments
According to the change log,
|
@jszakmeister: I looked at one of your test cases here (https://www.freelists.org/post/luajit/Assertion-error,2). You are doing a
The reason for this is that busted will reload any requred modules for each spec file. So local ffi = require 'ffi'
or, alternatively, you can do
This should prevent the Maybe LuaJIT doesn't like loading the The |
Thanks @o-lim! That does indeed help! Though, I think it might still be worthwhile for LuaJIT to fix though. |
Agreed, it looks like this has revealed some issues in LuaJIT that should be fixed. @jszakmeister does the workaround fix both the GC and ctype assertion issues or just the ctype assertion issue? Just wondering if the multiple loading of the |
@o-lim Yes, both are fixed with the workaround. Thank you so much for helping me out on this! |
👍 |
to prevent: `Assertion failed: (id > 0 && id < cts->top), function ctype_check, file ./lj_ctype.h` > http://www.freelists.org/post/luajit/Assertion-error,4 lunarmodules/busted#369 (comment)
to prevent: `Assertion failed: (id > 0 && id < cts->top), function ctype_check, file ./lj_ctype.h` > http://www.freelists.org/post/luajit/Assertion-error,4 lunarmodules/busted#369 (comment)
for reference, a possible fix: lunarmodules/luassert#150 |
I just wanted to give you guys a heads up that some of Busted's more recent changes have caused some issues for Neovim's test suite using LuaJIT.
This fixes one issue, but I don't think it's the right fix--I think LuaJIT is broken here:
Some other newer behavior in Busted is now helping to trigger an assertion error about ctypes in LuaJIT too--again, I don't think it's technically Busted's problem, but it may affect anyone who is using LuaJIT and the ffi module.
More than anything, I wanted to let you know that there are some issues with Busted and LuaJIT. I've brought this to the attention of Mike Pall as well. Hopefully, he can help track some of this down too: http://www.freelists.org/post/luajit/Assertion-error
The text was updated successfully, but these errors were encountered: