fix: bump mimalloc to 0.1.51 to fix win-arm64 process-exit crash#6176
Merged
ruben-arts merged 2 commits intoMay 21, 2026
Merged
Conversation
mimalloc 0.1.50 / libmimalloc-sys 0.1.47 (resolved in pixi 0.69.0) bundle mimalloc C v3.3.1, which crashes at process exit on Windows ARM64 with STATUS_ACCESS_VIOLATION (0xC0000005). Root cause: the MSVC C atomic wrapper on ARM64 used compare-exchange (a write-capable instruction) to implement loads of read-only sentinel objects, which triggers an access violation on read-only pages. Upstream fix: microsoft/mimalloc@60a1f3b, shipped in mimalloc v3.3.2, vendored into libmimalloc-sys 0.1.48 / mimalloc 0.1.51. Refs: microsoft/mimalloc#1277, astral-sh/uv#19192.
Prevent regressions to the buggy mimalloc 0.1.49 / 0.1.50 wrappers (which bundle the broken mimalloc C v3.3.0 / v3.3.1) by raising the minimum version requirement. The Cargo.lock already pins 0.1.51.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Any pixi command exits with
STATUS_ACCESS_VIOLATION(0xC0000005, decimal3221225477) on win-arm64 in 0.69.0. The crash happens after pixi has finished its work and printed all output, in a process-exit destructor, not in pixi logic. setup-pixi surfaces it because the runner treats the non-zero exit as a failure:Root cause. The crash is in mimalloc, our global allocator on Windows (
crates/pixi_allocator/src/lib.rs). Between 0.68.1 and 0.69.0, uv bumps transitively raised the resolved versions:mimalloc: 0.1.48 -> 0.1.50libmimalloc-sys: 0.1.44 -> 0.1.47That bump silently flipped the bundled C library from mimalloc v2 to mimalloc v3.3.1. The wrapper's opt-in feature flag was renamed from
v3tov2in 0.1.49, inverting the default; pixi pins no features, so we tracked whatever the new default was.mimalloc v3.3.0 / v3.3.1 has a known win-arm64 bug (microsoft/mimalloc#1277): the MSVC C atomic wrapper on ARM64 uses compare-exchange (a write-capable instruction) to implement loads of read-only sentinel objects, which triggers an access violation on read-only pages. The symptom in the linked issue matches byte-for-byte:
exit code: 0xc0000005, STATUS_ACCESS_VIOLATION. uv and ruff hit the same bug (astral-sh/uv#19192, astral-sh/ruff#24880); they pinned tomimalloc/v2before v3.3.2 shipped.Fix. Upstream fixed it in microsoft/mimalloc@60a1f3b, shipped in mimalloc C v3.3.2 (verified
git compare v3.3.2...60a1f3bshows v3.3.2 contains the commit). That vendored C version landed inlibmimalloc-sys 0.1.48/mimalloc 0.1.51. This PR:libmimalloc-sys 0.1.47 -> 0.1.48andmimalloc 0.1.50 -> 0.1.51inCargo.lock.crates/pixi_allocator/Cargo.tomlto0.1.51so future resolutions can't drop back to a buggy version.No source code changes.
How Has This Been Tested?
pixi info --manifest-path ...); should exit 0 with this branch where 0.69.0 exits 3221225477.AI Disclosure
Tools: Claude Code
Checklist: