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
[svacer] lua_pcall result is ignored in src/lua/serializer.c #9396
Labels
bug
Something isn't working
Comments
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
Nov 27, 2023
Without checking the return value of lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes tarantool#9396
igormunkin
pushed a commit
to igormunkin/tarantool
that referenced
this issue
Dec 5, 2023
Without checking the return value of lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes tarantool#9396 (cherry picked from commit 98474f7)
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
Dec 7, 2023
Without checking the return value of lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes tarantool#9396 (cherry picked from commit 98474f7)
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
Dec 7, 2023
Without checking the return value of `lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes tarantool#9396 (cherry picked from commit 98474f7)
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
Dec 7, 2023
Without checking the return value of `lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes tarantool#9396 (cherry picked from commit 98474f7) Since the behavior of the <app/fiber.lua> test is changed in 2.11 the result file is updated here.
igormunkin
pushed a commit
that referenced
this issue
Dec 7, 2023
Without checking the return value of `lua_pcall()` in `lua_field_inspect_ucdata()`, the error message itself is returned as a serialized result. The result status of `lua_pcall()` is not ignored now. NO_DOC=bugfix Closes #9396 (cherry picked from commit 98474f7) Since the behavior of the <app/fiber.lua> test is changed in 2.11 the result file is updated here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Svacer link
Relevant code:
tarantool/src/lua/serializer.c
Lines 269 to 282 in 1f128c5
The result of
lua_pcall
on line 277 is ignored. Butlua_pcall()
pushes the error message on the stack in case there was an error. So if we leave thelua_pcall
result unchecked we then serialize the error. Basically, if__serialize
metamethod returns an error ,this error will be silently serialized.This might've been changed accidentally quite a while ago: 5519276. In this commit a
lua_call
wrapped withtry ... catch
was replaced with a lua_pcall. So previously the error wasn't serialized, even though it was ignored as well.It seems we shouldn't ignore the
__serialize
errors and report them to the user.The text was updated successfully, but these errors were encountered: