mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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).
This commit is contained in:
parent
81e4fce530
commit
7923dbbf72
2 changed files with 87 additions and 69 deletions
|
|
@ -121,6 +121,9 @@ assert(not string.find(doit"aaa={13}; local bbbb=1; aaa[bbbb](3)", "'bbbb'"))
|
|||
checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number")
|
||||
checkmessage("aaa=(1)..{}", "a table value")
|
||||
|
||||
-- bug in 5.4.6
|
||||
checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'")
|
||||
|
||||
_G.aaa, _G.bbbb = nil
|
||||
|
||||
-- calls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue