aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
authorMike Pall <mike>2023-04-16 18:13:48 +0200
committerMike Pall <mike>2023-04-16 18:13:48 +0200
commit1c279127050e86e99970100e9c42e0f09cd54ab7 (patch)
treeefdc67dab9c461e3122b8bf99a13157be5daf02e /dynasm
parent8bbd58e534522a7e1ab9ee2c0d7fb723741dd089 (diff)
downloadluajit-1c279127050e86e99970100e9c42e0f09cd54ab7.tar.gz
luajit-1c279127050e86e99970100e9c42e0f09cd54ab7.tar.bz2
luajit-1c279127050e86e99970100e9c42e0f09cd54ab7.zip
Print errors from __gc finalizers instead of rethrowing them.
Finalizers are not supposed to throw errors -- this is undefined behavior. Lua 5.1 - 5.3 and (previously) LuaJIT rethrow the error. This randomly breaks some unrelated code that just happens to do an allocation. Bad. Lua 5.4 catches the error and emits a warning instead. But warnings are not enabled by default, so it fails silently. Even worse. LuaJIT (now) catches the error and emits a VM event. The default event handler function prints "ERROR in finalizer: ...". Set a custom handler function with: jit.attach(handler, "errfin")
Diffstat (limited to 'dynasm')
0 files changed, 0 insertions, 0 deletions