Panic functions should not raise errors

The standard panic function was using 'lua_tostring', which may raise
a memory-allocation error if error value is a number.
This commit is contained in:
Roberto Ierusalimschy committed 2023-11-24 16:08:55 -03:00
1 parent 7923dbbf72
commit 842a83f09c
3 files changed
+14 -4

No files matched your search

+4
View File
@@ -4486,6 +4486,10 @@ This string always has a zero (@Char{\0})
after its last character (as @N{in C}),
but can contain other zeros in its body.
This function can raise memory errors only
when converting a number to a string
(as then it has to create a new string).
}
@APIEntry{lua_Number lua_tonumber (lua_State *L, int index);|