mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 00:25:34 +08:00
Ignore known ASan fiber warning in LLVM self-hosting check (#519)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user