Repository navigation
Fix remaining audit compatibility defects - #25
Conversation
Summary
Merge Risk:
|
There was a problem hiding this comment.
This PR fixes multiple HotSpot audit compatibility defects: invokedynamic bootstrap caching (including failed bootstraps and primitive dynamic constants), exception catch type resolution through defining loaders, file inode/permission preservation after rename/unlink, host symlink resolution before '..', Deflater dictionary rejection during active compression, and library call restriction to public methods. Tests validate each fix against HotSpot behavior. However, the exception handler resolution in src/interp.ts has a defect: when catch type resolution fails (e.g., NoClassDefFoundError), the code catches the error and continues to subsequent handlers instead of throwing immediately, violating the JVM spec which requires the linkage error to be thrown at the point of the failing catch clause.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict request_changes
There was a problem hiding this comment.
This PR fixes several audit compatibility defects: invokedynamic linkage caching, exception catch type resolution, file inode/permission preservation after unlink/rename, host symlink resolution before '..', Deflater dictionary rejection, and private static method exclusion. However, there are clear defects in the exception handling logic (interp.ts), primitive dynamic constant caching (indy.ts), NodeBackend symlink resolution for non-root mounts (node.ts), and unsafe Map iteration during rename (io.ts).
Not approved: 1 earlier point is still open in the threads.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict comment
There was a problem hiding this comment.
This PR fixes multiple audit compatibility defects: invokedynamic linkage caching for failed bootstraps and primitive dynamic constants; exception catch-type resolution through defining loader with restart-on-failure semantics; POSIX permission reporting with host errno preservation; inode identity preservation after rename/unlink; symlink resolution before '..' components; Deflater dictionary rejection during active compression; and private static method exclusion from JS overload selection. A clear bug exists in src/natives/io.ts where a Map is modified during keys() iteration. The exception handler restart logic in src/interp.ts was flagged in earlier review as diverging from JVM spec (restarts from handler 0 instead of failing handler), though PR claims HotSpot parity.
Not approved: the diff of test/paths/SymlinkDotDot.java, test/programs.test.ts was too large to read.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict comment
Superseded by the review of a28620f, which has no blocking findings, and its threads are settled.
Several VM and native operations diverge from HotSpot: failed bootstraps run again, exception handlers can catch unrelated same-named classes, and open-file attributes can describe the wrong file after unlink. Fix these paths and the other confirmed audit defects in their shared implementations.
ldcand bootstrap arguments, including primitive constants...for reads and mutations, preserving terminal symlinks and virtual mount selection.Validation: failing-before/passing-after HotSpot comparisons for the confirmed defects;
DeflaterState,ZipStreams,LinkageCaching,LoaderCatch,FstatAfterUnlink,OpenFileInodes,PosixPermissions, and host symlink operations pass. The native-callback, library and JS-proxy suites, VFS regressions and TypeScript typecheck pass. CI also runs the new permission-error, catch-resolution-failure and reference-exit regressions, plus broader verification.Additional review at
a28620fcovered the files skipped by the review bot:test/paths/SymlinkDotDot.javaand the fulltest/programs.test.tsdiff. No findings. Coverage included read/create/move/delete paths, terminal-symlink target preservation, the reference exit assertion, temporary-file cleanup, Windows skip, andONLY/ test-name selection.Noticed, not fixed
The support docs now state the existing stored-block compression limitation and explain why browser fetch cannot expose manual redirects. Java
longresults keep the established JS-number conversion; the browser guide documents its precision limit and exact string/array alternatives.