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.
2 years ago
Roberto Ierusalimschy
c197885cb0
Small improvements in tests
2 years ago
Roberto Ierusalimschy
934e77a286
Details
- Better comments about short strings in opcodes.
- luaH_newkey made static.
2 years ago
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.
2 years ago
Roberto Ierusalimschy
e15f1f2bb7
Details
Typos in comments and details in the manual.
2 years ago
Roberto Ierusalimschy
b5c65705ca
New year (2023)
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
2 years ago
Roberto Ierusalimschy
7ca8105a2e
More orderliness in casts of enumerations
2 years ago
Roberto Ierusalimschy
94689ac3ad
More regularity in uses of enums in 'lcode.c'
2 years ago
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.
2 years ago
Roberto Ierusalimschy
c4b71b7ba0
Details
Comments in 'onelua.c'
2 years ago
Roberto Ierusalimschy
1de2f31694
Corrected support for 16-bit systems
We still need access to a 16-bit system to correctly test
these changes.
2 years ago
Roberto Ierusalimschy
02bab9fc25
Bug: Wrong line in error message for arith. errors
It also causes 'L->top' to be wrong when the error happens,
triggering an 'assert'.
2 years ago
Roberto Ierusalimschy
5e08b41567
Simpler definition for LUA_STRFTIMEOPTIONS
There is no need for those intermediate definitions.
2 years ago
Roberto Ierusalimschy
cf08915d62
New macro LUA_USE_IOS
Do not try to detect automatically whether system is iOS; it is
simpler and more reliable to let the programmer inform that.
2 years ago
Roberto Ierusalimschy
c888ae0aea
Small changes in hash of pointers
When converting from pointer to integer, use 'uintptr_t' if available;
otherwise try 'uintmax_t', and use 'size_t' as last resource.
2 years ago
Roberto Ierusalimschy
d69789da1c
Fix absence of 'system' in iOS
Despite claiming to be ISO, the C library in some Apple platforms
does not implement 'system'.
2 years ago
Roberto Ierusalimschy
314745ed84
Avoid excessive name pollution in test files
Test files are more polite regarding the use of globals when locals
would do, and when globals are necessary deleting them after use.
2 years ago
Roberto Ierusalimschy
0825cf237d
Detail in make file for testes/libs
Everything depends on the Lua version (as given by 'lua.h')
2 years ago
Roberto Ierusalimschy
f874d37fa2
Small change in barrier macros
Reuse macros for objects when defining the macros for values.
2 years ago
Roberto Ierusalimschy
35e01ed21d
Small improvements in 'lmem.c'
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.)
2 years ago
Roberto Ierusalimschy
6aabf4b15e
Details in some header files
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) +
better handling of some inclusion loops.
2 years ago
Roberto Ierusalimschy
fa2f294dd1
Reduce calls to 'luaC_step' when GC is stopped
2 years ago
Roberto Ierusalimschy
82fae58e25
Details
Parentheses and comments.
2 years ago
Roberto Ierusalimschy
9a77f57edc
Stop GC while building initial state
2 years ago
Roberto Ierusalimschy
be908a7d4d
Removed unused field 'UpVal.tbc'
2 years ago
Roberto Ierusalimschy
9ede317c70
Threads are created like other objects
Using a version of 'luaC_newobj' that allows offsets (extra space
before the object itself).
2 years ago
Roberto Ierusalimschy
ee645472eb
Stack reallocation done with a single realloc
To avoid the need of both the old and the new stack addresses valid
at the same time, to correct the pointers to the stack, these pointers
are changed to offsets before the reallocation and then changed back
to pointers after the reallocation.
2 years ago
Roberto Ierusalimschy
413a393e62
Stack indices changed to union's
That will allow to change pointers to offsets while reallocating
the stack.
2 years ago
Roberto Ierusalimschy
ba089bcb08
Details
Added comments in the makefile about other useful '-fsanitize' options.
2 years ago
Roberto Ierusalimschy
1e64c1391f
Bug: stack overflow with nesting of coroutine.close
2 years ago
Roberto Ierusalimschy
b85816b9a8
Removed test function 'luaH_isdummy'
It was not being used anywhere.
2 years ago
Roberto Ierusalimschy
c954db3924
Option '-l g=mod' added to the manual
Plus some other improvements in the manual.
2 years ago
Roberto Ierusalimschy
14d2803e55
Details
Some cast operations rewritten to use respective macros.
2 years ago
Roberto Ierusalimschy
7f12bf40c4
Portability issue in a test for 'string.format'
2 years ago
Roberto Ierusalimschy
26be27459b
Negation in constant folding of '>>' may overflow
2 years ago
Roberto Ierusalimschy
cfbe378f90
Small simplification in overflow check in 'getfield'
Subtracting a small non-negative int from a non-negative int cannot
overflow, and adding a non-negative int to INT_MIN cannot overflow.
2 years ago
Roberto Ierusalimschy
a1089b415a
Bug: 'utf8.codes' accepts spurious continuation bytes
2 years ago
Roberto Ierusalimschy
f8c4c4fcf2
New test for table rehash
2 years ago
Roberto Ierusalimschy
71bc69c2af
Note in the manual about using '...' as an expression
2 years ago
Roberto Ierusalimschy
cd56f222b7
Corrected error message in 'table.remove'
2 years ago
Roberto Ierusalimschy
69b77b6fde
Changed the growth rate of string buffers
The growth rate of string buffers was reduced from 2 to 1.5 (3/2).
As string buffers start larger (256~1024 bytes), they don't need to
grow that fast. Moreover, a lower rate allows multiplicative growth up
to larger sizes (3/2 of the maximum). (After that, the growth becomes
linear, which is mostly useless.)
2 years ago
Roberto Ierusalimschy
997f11f543
Bug: 'break' may not properly close variable in a 'for' loop
Function 'leaveblock' was generating "break" label before removing
variables from the closing block. If 'createlabel' created a 'close'
instruction (which it did when matching a goto/break that exited
the scope of an upvalue), that instruction would use the wrong level.
2 years ago
Roberto Ierusalimschy
02060b7a37
Simpler handling of Byte Order Mark (BOM)
2 years ago
Roberto Ierusalimschy
a1f77a234a
Bug: set correct pause when (re)entering gen. collection.
2 years ago
Roberto Ierusalimschy
c6cea857a4
Better documentation for 'multires' expressions
Manual has a new section explaining multires expressions, lists of
expressions, and adjustments. This commit also corrects some comments
in the code.
2 years ago
Roberto Ierusalimschy
d61b0c6028
More checks and documentation for uses of EXTRA_STACK
2 years ago
Roberto Ierusalimschy
196bb94d66
Bug: 'lua_settop' may use an invalid pointer to stack
2 years ago
Roberto Ierusalimschy
603b2c64ad
'luaV_concat' can use invalidated pointer to stack
Bug introduced in commit 42d40581
.
2 years ago
Roberto Ierusalimschy
4a00f61276
'lua_checkstack' doesn't need to check stack overflow
'luaD_growstack' already checks that. This commit also fixes an
internal bug in 'luaD_growstack': a large 'n' could cause an arithmetic
overflow when computing 'needed'.
2 years ago
Roberto Ierusalimschy
42d40581dd
Save stack space while handling errors
Because error handling (luaG_errormsg) uses slots from EXTRA_STACK,
and some errors can recur (e.g., string overflow while creating an
error message in 'luaG_runerror', or a C-stack overflow before calling
the message handler), the code should use stack slots with parsimony.
This commit fixes the bug "Lua-stack overflow when C stack overflows
while handling an error".
3 years ago