aboutsummaryrefslogtreecommitdiff
path: root/ltable.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-06-05Bug: Tricky _PROMPT may trigger undefined behaviorRoberto Ierusalimschy1-2/+3
2024-06-05More permissive use of 'errno'Roberto Ierusalimschy2-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.
2024-06-04Bug: luaL_traceback may need more than 5 stack slotsRoberto Ierusalimschy3-1/+20
2024-06-04Bug: overlapping assignmentsRoberto Ierusalimschy1-2/+4
ISO C forbids assignment of a union field to another field of the same union.
2024-06-04More disciplined use of 'errno'Roberto Ierusalimschy3-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).
2024-05-14Detail in the manualRoberto Ierusalimschy1-1/+4
Function 'lua_toclose' can raise a non-memory error (but not a memory error).
2024-05-13DetailsRoberto Ierusalimschy2-3/+3
Typos in comments.
2024-05-13Bug: Active-lines for stripped vararg functionsRoberto Ierusalimschy3-23/+34
Lua seg. faults when asked to create the 'activelines' table for a vararg function with no debug information.
2024-04-26Towards release 5.4.7Roberto Ierusalimschy6-12/+13
2024-02-07Avoids a warning when lua_Number is 'float'Roberto Ierusalimschy1-1/+1
2024-01-11Bug: Yielding in a hook stops in the wrong instructionRoberto Ierusalimschy3-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.
2023-12-21Bug: Buffer overflow in string concatenationRoberto Ierusalimschy2-2/+2
Even if the string fits in size_t, the whole size of the TString object can overflow when we add the header.
2023-11-24Panic functions should not raise errorsRoberto Ierusalimschy3-4/+14
The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.
2023-11-01Bug: Recursion in 'getobjname' can stack overflowRoberto Ierusalimschy2-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).
2023-10-26Simpler test in 'luaH_getint'Roberto Ierusalimschy1-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.
2023-09-08Removed test for "corrupted binary dump"Roberto Ierusalimschy2-15/+1
Test is too non portable. (For instance, it does not work for different number types.)
2023-09-08Avoid casts from unsigned long to floating-pointRoberto Ierusalimschy1-7/+24
Old Microsoft compilers do not support those casts.
2023-08-25Cannot use 'getshrstr' before setting 'shrlen'Roberto Ierusalimschy1-1/+1
2023-08-23Documentation for "LUA_NOENV"Roberto Ierusalimschy1-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.
2023-08-23Bug: Wrong line number for function callsRoberto Ierusalimschy2-10/+10
2023-08-17More disciplined use of 'getstr' and 'tsslen'Roberto Ierusalimschy9-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.
2023-08-17More control over encoding of test filesRoberto Ierusalimschy6-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).
2023-07-25Bug: Call hook may be called twice when count hook yieldsRoberto Ierusalimschy4-11/+27
Took the opportunity and moved the code that controls call hooks in 'luaV_execute' into a function.
2023-07-13Thread stacks resized in the atomic phaseRoberto Ierusalimschy1-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.
2023-07-03DetailsRoberto Ierusalimschy2-3/+2
2023-06-21Removed redundancy in definitions of version/releaseRoberto Ierusalimschy1-11/+21
String rendering now derived from the numeric original definitions.
2023-06-16Avoid inclusion loop in 'ltm.h'Roberto Ierusalimschy1-3/+2
2023-06-14Bug: read overflow in 'l_strcmp'Roberto Ierusalimschy1-18/+20
Equality according to 'strcoll' does not imply that strings have the same length.
2023-05-22Several functions turned 'static'Roberto Ierusalimschy7-23/+18
Several functions that were already being used only inside their own file have been declared as 'static'.
2023-05-15Option '-l' discards version sufix from file nameRoberto Ierusalimschy4-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.
2023-05-15Small improvements in testsRoberto Ierusalimschy2-21/+24
2023-05-15DetailsRoberto Ierusalimschy5-14/+14
- Better comments about short strings in opcodes. - luaH_newkey made static.
2023-05-02"Emergency" new version 5.4.6v5.4.6Roberto Ierusalimschy5-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.
2023-04-18Detailsv5.4.5Roberto Ierusalimschy7-14/+14
Typos in comments and details in the manual.
2023-03-31New year (2023)Roberto Ierusalimschy3-5/+4
Also, small tweak in makefile. (-Wsign-compare is already enabled by -Wextra.)
2023-03-27More orderliness in casts of enumerationsRoberto Ierusalimschy2-27/+57
2023-03-24More regularity in uses of enums in 'lcode.c'Roberto Ierusalimschy1-18/+18
2023-03-17Bug: Loading a corrupted binary file can segfaultRoberto Ierusalimschy3-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.
2023-03-09DetailsRoberto Ierusalimschy1-3/+17
Comments in 'onelua.c'
2023-03-09Corrected support for 16-bit systemsRoberto Ierusalimschy3-10/+8
We still need access to a 16-bit system to correctly test these changes.
2023-02-08Bug: Wrong line in error message for arith. errorsRoberto Ierusalimschy2-0/+12
It also causes 'L->top' to be wrong when the error happens, triggering an 'assert'.
2023-02-07Simpler definition for LUA_STRFTIMEOPTIONSRoberto Ierusalimschy1-15/+6
There is no need for those intermediate definitions.
2023-02-02New macro LUA_USE_IOSRoberto Ierusalimschy2-12/+11
Do not try to detect automatically whether system is iOS; it is simpler and more reliable to let the programmer inform that.
2023-02-02Small changes in hash of pointersRoberto Ierusalimschy1-4/+17
When converting from pointer to integer, use 'uintptr_t' if available; otherwise try 'uintmax_t', and use 'size_t' as last resource.
2023-01-24Fix absence of 'system' in iOSRoberto Ierusalimschy1-1/+17
Despite claiming to be ISO, the C library in some Apple platforms does not implement 'system'.
2022-12-28Avoid excessive name pollution in test filesRoberto Ierusalimschy26-261/+335
Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
2022-12-23Detail in make file for testes/libsRoberto Ierusalimschy1-5/+5
Everything depends on the Lua version (as given by 'lua.h')
2022-12-15Small change in barrier macrosRoberto Ierusalimschy1-8/+9
Reuse macros for objects when defining the macros for values.
2022-12-15Small improvements in 'lmem.c'Roberto Ierusalimschy1-27/+41
Added some auxiliary macros + fixed a bug in compilation option EMERGENCYGCTESTS. (It should not try to force an emergency collection when it cannot run one.)
2022-12-14Details in some header filesRoberto Ierusalimschy3-11/+21
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) + better handling of some inclusion loops.