Bun AOT Missed-Optimization in node:zlib crc32
- Investigating(current)
- Trending(upcoming)
- Workaround available(upcoming)
- Resolved(upcoming)
Executive summary
Bun 1.4.4-canary.1+7ca0042d3 experiences a missed-optimization in 'node:zlib' crc32 when argument types are fully proven during AOT compilation. Developers compiling scripts using `crc32` from `node:zlib` with fully typed arguments receive a missed-optimization entry in `bun compile --explain`.
No verified workaround yet
None of the linked reports describe a mitigation. Follow this incident to hear when one appears.
Official fixA missed-optimization in the Ahead-Of-Time (AOT) compilation step for 'node:zlib' crc32 when argument types are fully proven.
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reportAOT: missed-optimization on 'node:zlib' crc32 when argument types are fully proven(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4-canary.1+7ca0042d3 What platform is your computer? Linux 6.8.0-142-lowlatency x86_64 x86_64 What steps can reproduce the bug? Calling crc32 from node:zlib with fully typed arguments (Uint8Array, number) produces a missed-optimization entry in bun compile --explain. Minimal self-contained reproducer: // repro_crc32.ts import { crc32 } from 'node:zlib' function check(buf: Uint8Array): number { return crc32(buf, 0) >>> 0 } console.log(check(new Uint8Array([1,…
by yoch 0upvotes 1comments
Timeline
- First report on GitHub issue
AOT: missed-optimization on 'node:zlib' crc32 when argument types are fully proven
Source