Missing case for OP_GETVARG in symbolic execution

92 views
Skip to first unread message

Jure Bagić

unread,
Apr 11, 2026, 7:55:13 AMApr 11
to lua-l
Hi,

for c037162a in 'ldebug.c:569' the 'getobjname' function there is no
OP_GETVARG case. Is this intended or this part forgot to be updated after
the introduction of named vararg parameters?

For example, the following code will properly tell me the nil
value I attempted to call is a field and it's name:
> local function a(x, ...)
> ({...}).g(); -- or 'local t = {...}; t.g()'
> end
> a();

but not when I use the vararg parameter:
> local function a(x, ...t)
> t.g();
> end
> a();

Putting the OP_GETVARG case together with OP_GETTABLE in 'getobjname' is
quick fix.

--
Jure
signature.asc

Roberto Ierusalimschy

unread,
Apr 13, 2026, 10:13:46 AMApr 13
to lu...@googlegroups.com
Many thanks for the feedback.

-- Roberto

Roberto Ierusalimschy

unread,
Apr 13, 2026, 10:27:31 AMApr 13
to lu...@googlegroups.com
Forgot this part: "(You are right.)"

-- Roberto

Jure Bagić

unread,
Apr 13, 2026, 10:56:58 AMApr 13
to lu...@googlegroups.com
> Forgot this part: "(You are right.)"

:D

--
Jure
signature.asc
Reply all
Reply to author
Forward
0 new messages