Roberto Ierusalimschy
6e22fedb74
New release number, updated copyright year
v5.4.8
2025-05-21 13:52:56 -03:00
Roberto Ierusalimschy
267ef461d0
Bug: check for constructor overflow in [exp] fields
...
The check for constructor overflow was considering only fields with
explicit names, ignoring fields with syntax '[exp]=exp'.
2025-05-20 17:55:08 -03:00
Roberto Ierusalimschy
d1ee2a4deb
Bug: Bad error message with fields of string _ENV
...
Errors with fields of the string _ENV (e.g., ("_ENV").u + 1) report
the error as comming from a global.
2025-05-15 15:14:56 -03:00
Roberto Ierusalimschy
3fe7be956f
Bug: message handler can be overwritten
...
A __close metamethod can overwrite a message handler in the stack
when closing a thread or a state.
2025-03-17 16:14:17 -03:00
Roberto Ierusalimschy
983bc433e6
Bug: Use after free in 'luaV_finishset'
...
If a metatable is a weak table, its __newindex field could be collected
by an emergency collection while being used in 'luaV_finishset'. (This
bug has similarities with bug 5.3.2-1, fixed in commit a272fa66.)
2025-03-13 15:42:39 -03:00
Roberto Ierusalimschy
25da574fcb
Bug: 'luaD_seterrorobj' should not raise errors
...
This function can be called unprotected, so it should not raise any
kind of errors. (It could raise a memory-allocation error when creating
a message).
2025-03-12 16:01:03 -03:00
Roberto Ierusalimschy
f5e55be2a0
Bug: Missing error status in panic function
...
'luaD_throw' may call 'luaE_resetthread', which returns an error code
but clears 'L->status'; so, 'luaD_throw' should set that status again.
2025-01-16 16:25:11 -03:00
Roberto Ierusalimschy
9f0c0fe0de
Bug: Wrong limit for local variables in 16-bit systems
...
USHRT_MAX does not fit in an 'int' in 16-bit systems.
2024-09-10 11:34:42 -03:00
Roberto Ierusalimschy
782ef85b22
Bug: wrong code gen. for indices with comparisons
...
In function 'luaK_exp2val', used to generate code for indices: Macro
'hasjumps' does not consider the case when the whole expression is a
"jump" (a test). In all other of its uses, the surrounding code ensures
that the expression cannot be VJMP.
2024-08-17 12:37:04 -03:00
Roberto Ierusalimschy
30982bec96
Bug: Bad stack manipulation in 'multiline' (REPL)
...
'incomplete' was popping error message that should be used in case
there is no more lines to complete the input, that is, 'pushline'
returns NULL, due to end of file.
2024-07-05 14:31:07 -03:00
Roberto Ierusalimschy
1ab3208a1f
'lua.h' back to redundancy in version definitions
...
Several tools inspect 'lua.h' to extract version information, and
they assume the file will have some specific format.
v5.4.7
2024-06-13 15:13:52 -03:00
Roberto Ierusalimschy
21ff8de33a
Bug: Tricky _PROMPT may trigger undefined behavior
2024-06-05 13:37:16 -03:00
Roberto Ierusalimschy
7eb1ed21b7
More permissive use of 'errno'
...
Assume that no function will put garbage on errno (although ISO C allows
that). If any function during an operation set errno, and the operation
result in an error, assume that errno has something to say.
2024-06-05 11:50:42 -03:00
Roberto Ierusalimschy
2db966fcbf
Bug: luaL_traceback may need more than 5 stack slots
2024-06-04 16:40:53 -03:00
Roberto Ierusalimschy
ae9a0cbbb4
Bug: overlapping assignments
...
ISO C forbids assignment of a union field to another field of the same
union.
2024-06-04 12:52:52 -03:00
Roberto Ierusalimschy
d5212c13b0
More disciplined use of 'errno'
...
Set errno to zero before calling any function where we may use its
errno, and check errno for zero before using it (as functions may
not set it even in error).
2024-06-04 12:48:29 -03:00
Roberto Ierusalimschy
e0efebdbe4
Detail in the manual
...
Function 'lua_toclose' can raise a non-memory error (but not a
memory error).
2024-05-14 17:59:54 -03:00
Roberto Ierusalimschy
e84f7bf198
Details
...
Typos in comments.
2024-05-13 13:23:45 -03:00
Roberto Ierusalimschy
dfbde4c7d5
Bug: Active-lines for stripped vararg functions
...
Lua seg. faults when asked to create the 'activelines' table for a
vararg function with no debug information.
2024-05-13 13:10:35 -03:00
Roberto Ierusalimschy
de794a6527
Towards release 5.4.7
2024-04-26 14:55:18 -03:00
Roberto Ierusalimschy
8b83417de9
Avoids a warning when lua_Number is 'float'
2024-02-07 14:17:03 -03:00
Roberto Ierusalimschy
e288c5a918
Bug: Yielding in a hook stops in the wrong instruction
...
Yielding in a hook must decrease the program counter, because it already
counted an instruction that, in the end, was not executed. However,
that decrement should be done only when about to restart the thread.
Otherwise, inspecting the thread with the debug library shows it one
instruction behind of where it really is.
2024-01-11 13:44:16 -03:00
Roberto Ierusalimschy
5853c37a83
Bug: Buffer overflow in string concatenation
...
Even if the string fits in size_t, the whole size of the TString object
can overflow when we add the header.
2023-12-21 13:37:51 -03:00
Roberto Ierusalimschy
842a83f09c
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.
2023-11-24 16:08:55 -03:00
Roberto Ierusalimschy
7923dbbf72
Bug: Recursion in 'getobjname' can stack overflow
...
'getobjname' now broken in two, a basic version that handles locals,
upvalues, and constants, and a full version, which uses the basic
version to handle table accesses (globals and fields).
2023-11-01 12:00:54 -03:00
Roberto Ierusalimschy
81e4fce530
Simpler test in 'luaH_getint'
...
The test whether key is inside the array part of a table uses a bit
trick to avoid computing the real size of the array part.
2023-10-26 16:12:25 -03:00
Roberto Ierusalimschy
6baee9ef9d
Removed test for "corrupted binary dump"
...
Test is too non portable. (For instance, it does not work for
different number types.)
2023-09-08 16:19:21 -03:00
Roberto Ierusalimschy
edd8589f47
Avoid casts from unsigned long to floating-point
...
Old Microsoft compilers do not support those casts.
2023-09-08 11:34:39 -03:00
Roberto Ierusalimschy
07a9eab23a
Cannot use 'getshrstr' before setting 'shrlen'
2023-08-25 15:55:14 -03:00
Roberto Ierusalimschy
9363a8b990
Documentation for "LUA_NOENV"
...
Registry field "LUA_NOENV" (that signals to libraries that option -E
is on) now part of the "official" API of Lua stand-alone.
2023-08-23 13:50:38 -03:00
Roberto Ierusalimschy
5ab6a5756b
Bug: Wrong line number for function calls
2023-08-23 13:49:27 -03:00
Roberto Ierusalimschy
9b4f39ab14
More disciplined use of 'getstr' and 'tsslen'
...
We may want to add other string variants in the future; this change
documents better where the code may need to handle those variants.
2023-08-17 15:59:28 -03:00
Roberto Ierusalimschy
f4211a5ea4
More control over encoding of test files
...
The few UTF-8 test files are commented as such, and there is only one
non UTF-8 test file (to test non UTF-8 sources).
2023-08-17 10:42:56 -03:00
Roberto Ierusalimschy
1b3f507f62
Bug: Call hook may be called twice when count hook yields
...
Took the opportunity and moved the code that controls call hooks
in 'luaV_execute' into a function.
2023-07-25 16:50:44 -03:00
Roberto Ierusalimschy
6b51133a98
Thread stacks resized in the atomic phase
...
Although stack resize can be a little expensive, it seems unusual to
have too many threads needing resize during one GC cycle. On the other
hand, the change allows full collections to skip the propagate phase,
going straight from a pause to the atomic phase.
2023-07-13 14:55:46 -03:00
Roberto Ierusalimschy
cbae016202
Details
2023-07-03 14:12:54 -03:00
Roberto Ierusalimschy
ea39042e13
Removed redundancy in definitions of version/release
...
String rendering now derived from the numeric original definitions.
2023-06-21 15:04:24 -03:00
Roberto Ierusalimschy
05ec55f16b
Avoid inclusion loop in 'ltm.h'
2023-06-16 11:52:14 -03:00
Roberto Ierusalimschy
f623b96932
Bug: read overflow in 'l_strcmp'
...
Equality according to 'strcoll' does not imply that strings have
the same length.
2023-06-14 14:38:07 -03:00
Roberto Ierusalimschy
9be74ccc21
Several functions turned 'static'
...
Several functions that were already being used only inside their
own file have been declared as 'static'.
2023-05-22 14:47:54 -03:00
Roberto Ierusalimschy
09f3c2372f
Option '-l' discards version sufix from file name
...
Like 'require', the command-line option '-l' discards an optional
version suffix (everything after an hyphen) from a file name when
creating the module name.
2023-05-15 13:46:38 -03:00
Roberto Ierusalimschy
c197885cb0
Small improvements in tests
2023-05-15 10:20:13 -03:00
Roberto Ierusalimschy
934e77a286
Details
...
- Better comments about short strings in opcodes.
- luaH_newkey made static.
2023-05-15 10:07:25 -03:00
Roberto Ierusalimschy
6443185167
"Emergency" new version 5.4.6
...
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
v5.4.6
2023-05-02 16:41:43 -03:00
Roberto Ierusalimschy
e15f1f2bb7
Details
...
Typos in comments and details in the manual.
v5.4.5
2023-04-18 09:44:10 -03:00
Roberto Ierusalimschy
b5c65705ca
New year (2023)
...
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
2023-03-31 11:47:31 -03:00
Roberto Ierusalimschy
7ca8105a2e
More orderliness in casts of enumerations
2023-03-27 16:29:39 -03:00
Roberto Ierusalimschy
94689ac3ad
More regularity in uses of enums in 'lcode.c'
2023-03-24 15:52:03 -03:00
Roberto Ierusalimschy
ab859fe59b
Bug: Loading a corrupted binary file can segfault
...
The size of the list of upvalue names are stored separated from the
size of the list of upvalues, but they share the same array.
2023-03-17 15:52:09 -03:00
Roberto Ierusalimschy
c4b71b7ba0
Details
...
Comments in 'onelua.c'
2023-03-09 11:12:11 -03:00