Repository navigation
Bump mimalloc: upstream v3.5.3 - #44575
Conversation
f5892b6 to
5c67af5
Compare
5c67af5 to
4c75aab
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe mimalloc dependency now points to commit ChangesMimalloc dependency
Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to This updates the mimalloc source pin without changing build settings, and the inspected API declarations remain compatible. No actionable merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. Because it re-pins Bun's process-wide allocator and the new upstream tree could not be inspected from this review environment, a human look (and green CI on every platform) is still worthwhile before merge.
What was reviewed:
- The diff is the single
MIMALLOC_COMMITchange in scripts/build/deps/mimalloc.ts; the old SHA appears nowhere else in the repo, the dep declares no patches, and the build spec (src/static.cunity TU, MI_* defines, TLS-model cflags) is untouched. - Bun's binding surface in src/mimalloc_sys/mimalloc.rs includes
mi_free_size_aligned,mi_on_thread_idle_start, andmi_malloc_auto_align, so the upstream fix list and fork-only symbols are directly relied on; their signatures could not be re-checked against the new commit here. - Not verified: that the pinned SHA is the merged commit of oven-sh/mimalloc#60 on the fork's default branch rather than a branch head (no GitHub access from this run).
Extended reasoning...
The change is a one-line commit-pin bump for mimalloc in scripts/build/deps/mimalloc.ts, with no change to defines, sources, cflags, or patches, and no duplicate of the old SHA elsewhere in the repo. It touches no injection, auth, or data-exposure surface, but mimalloc is Bun's global malloc on Linux and the JS heap allocator on every platform, so an allocator regression would be process-wide. The review could not reach GitHub to confirm the SHA is the merged oven-sh/mimalloc#60 merge commit or to diff the upstream change against Bun's FFI bindings, and no local vendor checkout exists to compile from, so behavior preservation rests on CI rather than on anything verified here, which is why this is a defer rather than an approve.
Bun (cherry-picked onto the pinned commit, before Pi-Bolt's patch): - startup SIGILL on Linux arm64 when SVE2 is reported without SVE (oven-sh/bun#45099) - fetch sets up TLS once per connection (oven-sh/bun#44507) - stdout/stderr: O_NONBLOCK cleared for spawned children, no output dropped on EAGAIN (oven-sh/bun#43868) - a socket whose peer keeps the receive buffer full no longer stops timers (oven-sh/bun#45278) - PipeReader after a failed read (oven-sh/bun#43900), spawnSync (oven-sh/bun#44581) - TextEncoder.encode of a substring (oven-sh/bun#45281) - fetch over HTTP/2 after a TLS alert or an abort (oven-sh/bun#45422) - mimalloc 3.5.3 (oven-sh/bun#44560, oven-sh/bun#44575) WebKit (appended to the patch series): - a module removed while its import() is in flight (oven-sh/WebKit#748) - cgroup v2 limits beside a cgroup v1 hierarchy (oven-sh/WebKit#808) Test-file conflicts were resolved to the pinned tests; the source changes are as upstream.
What does this PR do?
Bumps mimalloc to oven-sh/mimalloc#60, which merges upstream
v3.5.3into the fork (it was atv3.5.2).mi_realloc(NULL, n),mi_reallocf,mi_strdup,mi_mallocnormi_new, with a TLS model where the thread local heap of a new thread starts out as NULL (macOS and Windows).mi_free_size_alignedof a small block with an alignment above its size. Bun's build (MI_FREE_USE_PAGEMAP=1) was not affected.mimalloc.h, and no signature thatsrc/mimalloc_sysbinds changes.The pin is the merge commit of that PR.
How did you verify your code works?
In the mimalloc PR: all tests in 11 configurations, a new test for the crash, and instruction counts for the allocation and free paths, which are the same before and after (52.5 per
mi_malloc/mi_freewith Bun's flags; start and exit 3190409 and 3190412). CI on the head of that PR (the same tree): the failures are the fourtest-docker-build-*tests (gpg cannot get the release key from a keyserver, which also fails on main and without Bun), two tests on the macOS 27 lane that also fail on main, and a sub-test ofspawn.test.tson the ASAN lane that was flaky on other branches before.