From 842a83f09caa2ebd4bc03e0076420148ac07c808 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 24 Nov 2023 16:08:55 -0300 Subject: 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. --- manual/manual.of | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'manual') diff --git a/manual/manual.of b/manual/manual.of index ad120f5e..cef3e22a 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -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);| -- cgit v1.2.3-55-g6feb