You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lu...@googlegroups.com
I just saw commit 267ef461d0b13aa28d667f12d1a61452c9db529c ("Bug: check for constructor overflow in [exp] fields") and it made me think about how in theory this 'limit' is never hit at all because if we expand checklimit it's basically:
if (cc->nh > MAX_INT) errorlimit(...);
All types here are signed ints, and I do not think any instance of int > MAX_INT is ever true.
-- Sainan
Roberto Ierusalimschy
unread,
May 26, 2025, 2:58:33 PMMay 26
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 'Sainan' via lua-l
> I just saw commit 267ef461d0b13aa28d667f12d1a61452c9db529c ("Bug: check for constructor overflow in [exp] fields") and it made me think about how in theory this 'limit' is never hit at all because if we expand checklimit it's basically:
>
> if (cc->nh > MAX_INT) errorlimit(...);
>
> All types here are signed ints, and I do not think any instance of int > MAX_INT is ever true.
Indeed.
-- Roberto
Roberto Ierusalimschy
unread,
May 27, 2025, 10:16:30 AMMay 27
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 'Sainan' via lua-l
This check is actually superfluous: Each field must generate at least
one opcode, and the number of opcodes is already limited by MAX_INT.
The same reasoning applies to 'na', the count of list fields; this
one never had an explicit check.