Ignore known ASan fiber warning in LLVM self-hosting check (#519)

This commit is contained in:
Chris Tate
2026-09-28 01:32:09 -05:00
committed by GitHub
parent 1cc30b4c5e
commit 6fd750c5e1
@@ -20,6 +20,13 @@ const execFileAsync = promisify(execFile);
const runOptions = { cwd: root, timeout: 60_000, maxBuffer: 256 * 1024 * 1024 };
const sanitize = process.env["SCRIPTC_SAN"] === "1";
function programStderr(stderr: Buffer): string {
const text = stderr.toString("utf8");
return sanitize
? text.replace(/^==\d+==WARNING: ASan doesn't fully support makecontext\/swapcontext functions and may produce false positives in some cases!\n/gm, "")
: text;
}
function nativeFeatures(mod: IrModule) {
return {
regex: moduleUsesRegex(mod), copying: moduleUsesCopying(mod),
@@ -159,7 +166,7 @@ for (const backend of ["c", "llvm"] as const) {
expect(result.status, `${source}: ${result.stderr}`).toBe(0);
}
expect(native.stdout, source).toEqual(node.stdout);
expect(native.stderr, source).toEqual(node.stderr);
expect(programStderr(native.stderr), source).toBe(programStderr(node.stderr));
}
// The seed emits its own complete IR, including the production