Skip to content

fix: close review bugs across VM, JIT, and native libs - #15

Merged
esrrhs merged 9 commits into
masterfrom
fix/review-bugs
Sep 18, 2026
Merged

esrrhs merged 9 commits into
masterfrom
fix/review-bugs

Conversation

@esrrhs

@esrrhs esrrhs commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Align mixed int/float compare with Lua 5.4 (l_intfitsf / F2Ieq), keep and/or on CompileBinop short-circuit, and reject NaN table keys.
  • Close remaining review bugs: closed default io no longer falls back to stdin/stdout, multi-read nil counts, exact 8MB process output, empty gmatch, gsub nil keep, and table.concat integer args.
  • Earlier commits on this branch also restore nested const-alloc, dump string upvalues, block-scoped labels, HTTP/URL port checks, yaml/xml decode depth, VM hot-path speedups, and NaN for-loop / spec-field / hex tonumber fixes.

Test plan

  • Targeted regression: mixed int/float compare, spec and/or short-circuit, closed default io, multi-read nil count, table NaN/concat, gmatch/gsub, process 8MB
  • Full unit_tests (1537 tests); test_io.test_io_flush restored stdout after switching default output so AllJitTypes reuse of one State stays valid

Made with Cursor

esrrhs and others added 9 commits September 16, 2026 11:02
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>
@esrrhs
esrrhs merged commit 564745b into master Sep 18, 2026
9 checks passed
@esrrhs
esrrhs deleted the fix/review-bugs branch September 18, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant