Skip to content

fix: disable mimalloc architecture optimizations on Linux ARM64 - #1204

Merged
Brooooooklyn merged 1 commit into
mainfrom
codex/fix-linux-arm64-allocator
Sep 10, 2026
Merged

fix: disable mimalloc architecture optimizations on Linux ARM64#1204
Brooooooklyn merged 1 commit into
mainfrom
codex/fix-linux-arm64-allocator

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

@node-rs/bcrypt@1.10.8 crashes during module loading on Raspberry Pi 4 because its bundled mimalloc allocator emits unconditional ARMv8.1 LSE atomics. Enable mimalloc-safe/no_opt_arch for Linux AArch64, covering GNU and musl, while preserving the existing macOS and Windows AArch64 optimization settings.

The feature sets both MI_OPT_ARCH=OFF and MI_NO_OPT_ARCH=ON; the latter prevents mimalloc's ARM64 defaults from enabling architecture optimizations again. Existing allocator TLS and exit-collection features are preserved.

Fixes #1199.

Validation:

  • Checked Cargo feature resolution for Linux AArch64 GNU/musl, macOS AArch64, Windows AArch64, Linux x86_64, Android AArch64, FreeBSD AArch64, and WASI. Only Linux AArch64 enables no_opt_arch.
  • Rebuilt the GNU ARM64 bcrypt addon with Rust 1.98.0 and Clang 14, and confirmed both CMake overrides and the absence of the forced -march=armv8.1-a compiler flag.
  • The rebuilt addon passes loading, synchronous/asynchronous hashing and verification, salt generation, and worker loading/execution/exit under QEMU Cortex-A72, Cortex-A53, and max.

Runtime validation used emulation; physical Raspberry Pi testing and native macOS/Windows builds were not run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T02:51:26.386785Z 61f7134 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Brooooooklyn
Brooooooklyn merged commit 7769109 into main Sep 10, 2026
36 checks passed
@Brooooooklyn
Brooooooklyn deleted the codex/fix-linux-arm64-allocator branch September 10, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ARM64 Bcrypt Binary SIGILL on Pi4 with PiOS Bookworm (and other OS)

1 participant