shim, page: informational runtime notes go to the debug console

Three notes printed as console errors, which web/test/site.mjs counts as
failures: "self-modifying-code: re-lifting page" (up to 8 per process,
and V8 under node rewrites its code constantly), "[sig] pid N runs a
handler", and gex.mjs's "module store at N MiB". Each is the runtime
reporting normal work. They go to trace_line / console.debug; real
errors stay console errors. In the page run with node and neovim
(devtools5) these three and the replaced-library notes (058ee461) were
all of its console errors.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_781bad2ec05143db9067c86b4b2678e2
This commit is contained in:
velzieandClaude Opus 5.5 committed 2026-10-10 11:40:43 -04:00
1 parent a7cd1b5b5a
commit c47bbff1a2
2 files changed
+8 -3

No files matched your search

+2 -1
View File
@@ -4820,7 +4820,8 @@ export class Gex {
// lost when the process exits soon after (tests/browser-registry.sh).
const fs = trace ? globalThis.process?.getBuiltinModule?.('fs') : null;
if (fs) fs.writeSync(2, `${line}\n`);
else console.error(line);
// A size report, not an error (a console error fails a page test).
else console.debug(line);
}
const [, a, b] = key.split(':');
e.gex_jit_note_external(BigInt(off), bytes.length, Number(a) | 0, Number(b) | 0);
+6 -2
View File
@@ -6430,7 +6430,9 @@ pub extern "C" fn gex_syscall(ctx: i32, pc: i64) {
} else {
String::new()
};
warn_line(&format!(
// Informational (a handler running is normal), so the
// debug console: a console error fails a page test.
trace_line(&format!(
"[sig] pid {} runs a handler at {target:#x}{last}\n",
h.kernel.pid
));
@@ -10651,8 +10653,10 @@ pub extern "C" fn gex_cache_op(_ctx: i32, _pc: i64, op: i32, addr: i64) {
let hi = lo + gex_abi::DISPATCH_PAGE;
h.jit.translated.retain(|&a| a < lo || a >= hi);
let n = SMC_INVALIDATIONS.fetch_add(1, std::sync::atomic::Ordering::Relaxed) + 1;
// Informational: a JIT (V8 under node) rewrites its code all the
// time and this is the runtime keeping up, not a fault.
if n <= 8 || tracing() {
warn_line(&format!(
trace_line(&format!(
"gex: self-modifying-code: re-lifting page {page:#x} \
(addr={:#x}, {n} so far)\n",
addr as u64,