aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bug: Missing error status in panic functionv5.4Roberto Ierusalimschy2025-01-163-0/+8
| | | | | 'luaD_throw' may call 'luaE_resetthread', which returns an error code but clears 'L->status'; so, 'luaD_throw' should set that status again.
* Bug: Wrong limit for local variables in 16-bit systemsRoberto Ierusalimschy2024-09-102-2/+2
| | | | USHRT_MAX does not fit in an 'int' in 16-bit systems.
* Bug: wrong code gen. for indices with comparisonsRoberto Ierusalimschy2024-08-172-1/+10
| | | | | | | 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.
* Bug: Bad stack manipulation in 'multiline' (REPL)Roberto Ierusalimschy2024-07-052-6/+10
| | | | | | '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.
* 'lua.h' back to redundancy in version definitionsv5.4.7Roberto Ierusalimschy2024-06-132-22/+12
| | | | | Several tools inspect 'lua.h' to extract version information, and they assume the file will have some specific format.
* Bug: Tricky _PROMPT may trigger undefined behaviorRoberto Ierusalimschy2024-06-051-2/+3
|
* More permissive use of 'errno'Roberto Ierusalimschy2024-06-052-7/+5
| | | | | | 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.
* Bug: luaL_traceback may need more than 5 stack slotsRoberto Ierusalimschy2024-06-043-1/+20
|
* Bug: overlapping assignmentsRoberto Ierusalimschy2024-06-041-2/+4
| | | | | ISO C forbids assignment of a union field to another field of the same union.
* More disciplined use of 'errno'Roberto Ierusalimschy2024-06-043-13/+38
| | | | | | 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).
* Detail in the manualRoberto Ierusalimschy2024-05-141-1/+4
| | | | | Function 'lua_toclose' can raise a non-memory error (but not a memory error).
* DetailsRoberto Ierusalimschy2024-05-132-3/+3
| | | | Typos in comments.
* Bug: Active-lines for stripped vararg functionsRoberto Ierusalimschy2024-05-133-23/+34
| | | | | Lua seg. faults when asked to create the 'activelines' table for a vararg function with no debug information.
* Towards release 5.4.7Roberto Ierusalimschy2024-04-266-12/+13
|
* Avoids a warning when lua_Number is 'float'Roberto Ierusalimschy2024-02-071-1/+1
|
* Bug: Yielding in a hook stops in the wrong instructionRoberto Ierusalimschy2024-01-113-6/+11
| | | | | | | | 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.
* Bug: Buffer overflow in string concatenationRoberto Ierusalimschy2023-12-212-2/+2
| | | | | Even if the string fits in size_t, the whole size of the TString object can overflow when we add the header.
* Panic functions should not raise errorsRoberto Ierusalimschy2023-11-243-4/+14
| | | | | The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.
* Bug: Recursion in 'getobjname' can stack overflowRoberto Ierusalimschy2023-11-012-69/+87
| | | | | | '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).
* Simpler test in 'luaH_getint'Roberto Ierusalimschy2023-10-261-11/+25
| | | | | 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.
* Removed test for "corrupted binary dump"Roberto Ierusalimschy2023-09-082-15/+1
| | | | | Test is too non portable. (For instance, it does not work for different number types.)
* Avoid casts from unsigned long to floating-pointRoberto Ierusalimschy2023-09-081-7/+24
| | | | Old Microsoft compilers do not support those casts.
* Cannot use 'getshrstr' before setting 'shrlen'Roberto Ierusalimschy2023-08-251-1/+1
|
* Documentation for "LUA_NOENV"Roberto Ierusalimschy2023-08-231-0/+4
| | | | | Registry field "LUA_NOENV" (that signals to libraries that option -E is on) now part of the "official" API of Lua stand-alone.
* Bug: Wrong line number for function callsRoberto Ierusalimschy2023-08-232-10/+10
|
* More disciplined use of 'getstr' and 'tsslen'Roberto Ierusalimschy2023-08-179-33/+37
| | | | | We may want to add other string variants in the future; this change documents better where the code may need to handle those variants.
* More control over encoding of test filesRoberto Ierusalimschy2023-08-176-28/+49
| | | | | 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).
* Bug: Call hook may be called twice when count hook yieldsRoberto Ierusalimschy2023-07-254-11/+27
| | | | | Took the opportunity and moved the code that controls call hooks in 'luaV_execute' into a function.
* Thread stacks resized in the atomic phaseRoberto Ierusalimschy2023-07-131-3/+5
| | | | | | | 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.
* DetailsRoberto Ierusalimschy2023-07-032-3/+2
|
* Removed redundancy in definitions of version/releaseRoberto Ierusalimschy2023-06-211-11/+21
| | | | String rendering now derived from the numeric original definitions.
* Avoid inclusion loop in 'ltm.h'Roberto Ierusalimschy2023-06-161-3/+2
|
* Bug: read overflow in 'l_strcmp'Roberto Ierusalimschy2023-06-141-18/+20
| | | | | Equality according to 'strcoll' does not imply that strings have the same length.
* Several functions turned 'static'Roberto Ierusalimschy2023-05-227-23/+18
| | | | | Several functions that were already being used only inside their own file have been declared as 'static'.
* Option '-l' discards version sufix from file nameRoberto Ierusalimschy2023-05-154-11/+26
| | | | | | 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.
* Small improvements in testsRoberto Ierusalimschy2023-05-152-21/+24
|
* DetailsRoberto Ierusalimschy2023-05-155-14/+14
| | | | | - Better comments about short strings in opcodes. - luaH_newkey made static.
* "Emergency" new version 5.4.6v5.4.6Roberto Ierusalimschy2023-05-025-22/+41
| | | | | | '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.
* Detailsv5.4.5Roberto Ierusalimschy2023-04-187-14/+14
| | | | Typos in comments and details in the manual.
* New year (2023)Roberto Ierusalimschy2023-03-313-5/+4
| | | | | Also, small tweak in makefile. (-Wsign-compare is already enabled by -Wextra.)
* More orderliness in casts of enumerationsRoberto Ierusalimschy2023-03-272-27/+57
|
* More regularity in uses of enums in 'lcode.c'Roberto Ierusalimschy2023-03-241-18/+18
|
* Bug: Loading a corrupted binary file can segfaultRoberto Ierusalimschy2023-03-173-2/+22
| | | | | 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.
* DetailsRoberto Ierusalimschy2023-03-091-3/+17
| | | | Comments in 'onelua.c'
* Corrected support for 16-bit systemsRoberto Ierusalimschy2023-03-093-10/+8
| | | | | We still need access to a 16-bit system to correctly test these changes.
* Bug: Wrong line in error message for arith. errorsRoberto Ierusalimschy2023-02-082-0/+12
| | | | | It also causes 'L->top' to be wrong when the error happens, triggering an 'assert'.
* Simpler definition for LUA_STRFTIMEOPTIONSRoberto Ierusalimschy2023-02-071-15/+6
| | | | There is no need for those intermediate definitions.
* New macro LUA_USE_IOSRoberto Ierusalimschy2023-02-022-12/+11
| | | | | Do not try to detect automatically whether system is iOS; it is simpler and more reliable to let the programmer inform that.
* Small changes in hash of pointersRoberto Ierusalimschy2023-02-021-4/+17
| | | | | When converting from pointer to integer, use 'uintptr_t' if available; otherwise try 'uintmax_t', and use 'size_t' as last resource.
* Fix absence of 'system' in iOSRoberto Ierusalimschy2023-01-241-1/+17
| | | | | Despite claiming to be ISO, the C library in some Apple platforms does not implement 'system'.