diff --git a/src/cli.zig b/src/cli.zig index 58c31ffdd1..d3e719e70d 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -629,7 +629,7 @@ pub const Command = struct { if (bun.getenvZ("MI_VERBOSE") == null) { bun.mimalloc.mi_option_set_enabled(.verbose, false); } - + // Suppress mimalloc warnings for memory-mapped PE sections (Windows compilation) // These warnings occur when processing large Windows PE files (~118MB) because // mimalloc's heuristics flag memory-mapped sections as suspicious, then confirm diff --git a/test/bundler/windows-pe-checksum.test.ts b/test/bundler/windows-pe-checksum.test.ts index 549a220fb7..f341247f9e 100644 --- a/test/bundler/windows-pe-checksum.test.ts +++ b/test/bundler/windows-pe-checksum.test.ts @@ -35,17 +35,18 @@ describe.skipIf(isWindows)("Windows PE Checksum Verification", () => { const [stderr, exitCode] = await Promise.all([new Response(proc.stderr).text(), proc.exited]); expect(exitCode).toBe(0); - + // Filter out mimalloc warnings which are expected for large allocations (Windows PE files ~118MB) const filteredStderr = stderr - .split('\n') - .filter(line => - !line.includes('mimalloc: warning:') && - !line.includes('(this may still be a valid very large allocation') && - !line.includes('(yes, the previous pointer') && - line.trim() !== '' + .split("\n") + .filter( + line => + !line.includes("mimalloc: warning:") && + !line.includes("(this may still be a valid very large allocation") && + !line.includes("(yes, the previous pointer") && + line.trim() !== "", ) - .join('\n') + .join("\n") .trim(); expect(filteredStderr).toBe(""); diff --git a/test/bundler/windows-resources-exiftool.test.ts b/test/bundler/windows-resources-exiftool.test.ts index c0d7f0064d..fd9db5247a 100644 --- a/test/bundler/windows-resources-exiftool.test.ts +++ b/test/bundler/windows-resources-exiftool.test.ts @@ -39,17 +39,18 @@ describe.skipIf(isWindows)("Windows Resource Editing with exiftool", () => { console.error("stderr:", stderr); } expect(exitCode).toBe(0); - + // Filter out mimalloc warnings which are expected for large allocations (Windows PE files ~118MB) const filteredStderr = stderr - .split('\n') - .filter(line => - !line.includes('mimalloc: warning:') && - !line.includes('(this may still be a valid very large allocation') && - !line.includes('(yes, the previous pointer') && - line.trim() !== '' + .split("\n") + .filter( + line => + !line.includes("mimalloc: warning:") && + !line.includes("(this may still be a valid very large allocation") && + !line.includes("(yes, the previous pointer") && + line.trim() !== "", ) - .join('\n') + .join("\n") .trim(); expect(filteredStderr).toBe("");