fix: close review bugs across VM, JIT, and native libs - #15
Merged
Merged
Conversation
Keep file-level values on the const heap, bound Call/CALLNAME arity, make ipairs and spec tables match Lua, and harden HTTP/WS/AES/math/net. Co-authored-by: Cursor <cursoragent@cursor.com>
…ed labels Nested ConstAllocScope was clearing the init flag and UAFing file-level tables after load(). Sibling Lua labels emitted duplicate C names, interp CALL truncated past 32 args, and HTTP/WS/DB ports still accepted injected or out-of-range values. Co-authored-by: Cursor <cursoragent@cursor.com>
http.request and url.format truncated ports past 65535, WS Host still accepted CR/LF in ip, and yaml/xml decode could recurse without the encode-side depth limits. Co-authored-by: Cursor <cursoragent@cursor.com>
…alls Inline the interp hot path, skip boxes for uncaptured functions, and throw when flattened arguments exceed 32 so callers cannot silently misalign. Co-authored-by: Cursor <cursoragent@cursor.com>
Typed integer for with a float snapshot still emits a native cursor so sum+i compiles, but shadowed or call-assigned loop vars stay CVar. Spec calls now use the sanitized C symbol, arena iterators run destructors, and sqlite/io/utf8 stop spinning or mis-handling empty/zero-index cases. Co-authored-by: Cursor <cursoragent@cursor.com>
…rse hex tonumber Float and dynamic numeric for now follow FORPREP/FORLOOP so a NaN limit runs once; merged table specs no longer share C field names; tonumber accepts 0x1p1-style floats. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep and/or on CompileBinop short-circuit so spec calls are not run on the skipped side, reject NaN table keys, and align io, process, gmatch/gsub, and table.concat edge cases with Lua 5.4. Co-authored-by: Cursor <cursoragent@cursor.com>
Pass add/sub/mul names into FL_VM_ARITH_INT instead of a bare +, -, or * token so cppcheck 2.12.1 can parse the interpreter dispatch. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
l_intfitsf/F2Ieq), keepand/oron CompileBinop short-circuit, and reject NaN table keys.gmatch,gsubnil keep, andtable.concatinteger args.tonumberfixes.Test plan
and/orshort-circuit, closed default io, multi-read nil count, table NaN/concat, gmatch/gsub, process 8MBunit_tests(1537 tests);test_io.test_io_flushrestored stdout after switching default output so AllJitTypes reuse of one State stays validMade with Cursor