oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
10.55k stars 388 forks source link

Binary crashes on 16kb page size arm64 systems #3783

Closed refi64 closed 2 months ago

refi64 commented 2 months ago

On Asahi Linux, the binaries on npm crash:

$ node_modules/oxlint/bin/oxlint
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 56 bytes failed

This is because jemalloc hardcodes the max system page size at build time, and on arm64 systems, that might not be 4kb like it is on CI; in particular, Asahi Linux & Raspberry Pi OS use a 16k page size.

Other projects have resolved this by compiling jemalloc on arm64 to use a 16k page size, e.g. see fd's change which just does export JEMALLOC_SYS_WITH_LG_PAGE=16 before the build.

overlookmotel commented 2 months ago

Just to say: thanks loads @refi64 for bringing this to our attention and for providing the info to fix.