Skip to content
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

Can't pass LUA_USE_APICHECK #2406

Closed
2 tasks done
mercury233 opened this issue Dec 12, 2021 · 2 comments
Closed
2 tasks done

Can't pass LUA_USE_APICHECK #2406

mercury233 opened this issue Dec 12, 2021 · 2 comments

Comments

@mercury233
Copy link
Collaborator

mercury233 commented Dec 12, 2021

Build lua with LUA_USE_APICHECK, it will fail on

  • api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
    when calling *yield_value = lua_isboolean(rthread, -1) ... in interpreter::call_coroutine

and fail on

  • api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread");
    when calling lua_pcall(current_state, param_count, ret_count, 0) in interpreter::call_function

It happen in both lua 5.3 and 5.4.

@mercury233
Copy link
Collaborator Author

for the 2nd problem, we are calling lua functions from current_state which maybe a yielded lua thread, and lua don't allow this actually: https://www.lua.org/manual/5.4/manual.html#lua_status

@salix5
Copy link
Collaborator

salix5 commented Jun 2, 2024

fixed by Fluorohydride/ygopro-core#582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants