Share the Emscripten syscall-stub filter, save through the manual download entry, select through the Outliner, and open the 集合 property tab before the collection workbench (hidden until then). Add the suite usage doc. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
9 lines
729 B
TypeScript
9 lines
729 B
TypeScript
/* Emscripten's debug libc reports unimplemented syscalls on stderr, which the
|
|
* worker surfaces as a console error. __syscall_mprotect is such a stub: it
|
|
* prints only in non-NDEBUG builds and returns success ("let's not and say we
|
|
* did", system/lib/libc/emscripten_syscall_stubs.c). Keep the raw text in the
|
|
* receipt (consoleErrors) and exclude only this exact shape from assertions. */
|
|
export const RUNTIME_STUB_NOISE = /^warning: unsupported syscall: __syscall_[a-z0-9_]+$/;
|
|
export const runtimeNoise = (errors: string[]): string[] => errors.filter(text => RUNTIME_STUB_NOISE.test(text.trim()));
|
|
export const productErrors = (errors: string[]): string[] => errors.filter(text => !RUNTIME_STUB_NOISE.test(text.trim()));
|