Skip to content

fix(sys): use LOCAL TLS for mimalloc v3 on macOS again - #117

Merged
shulaoda merged 1 commit into
mainfrom
fix/macos-v3-local-tls
Oct 29, 2026
Merged

shulaoda merged 1 commit into
mainfrom
fix/macos-v3-local-tls

Conversation

@shulaoda

@shulaoda shulaoda commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Related to #116

Go back to MI_TLS_MODEL=LOCAL for v3 on macOS: with PTHREADS (#110), mi_process_done deletes the pthread key at exit while other threads may still be allocating, which aborts rolldown's CLI on exit: https://github.com/rolldown/rolldown/actions/runs/40803444105/job/123222619759

With PTHREADS, `mi_process_done` deletes the default theap's pthread key at
exit while other threads may still be allocating, so their next allocation
re-initializes the thread: an assertion failure in debug builds and a new
theap per allocation in release builds.
@shulaoda
shulaoda marked this pull request as ready for review October 29, 2026 08:06
@shulaoda
shulaoda merged commit cc1ef6f into main Oct 29, 2026
20 checks passed
@shulaoda
shulaoda deleted the fix/macos-v3-local-tls branch October 29, 2026 08:12
@github-actions github-actions Bot mentioned this pull request Oct 29, 2026
shulaoda pushed a commit that referenced this pull request Oct 29, 2026
## 🤖 New release

* `libmimalloc-sys2`: 0.1.64 -> 0.1.65 (✓ API compatible changes)
* `mimalloc-safe`: 0.1.68 -> 0.1.69

<details><summary><i><b>Changelog</b></i></summary><p>

## `libmimalloc-sys2`

<blockquote>

## [0.1.65] - 2026-10-29

### Bug Fixes

- *(sys)* Use LOCAL TLS for mimalloc v3 on macOS again
([#117](#117))
</blockquote>

## `mimalloc-safe`

<blockquote>

## [0.1.69] - 2026-10-29

### Chore

- Updated the following local packages: libmimalloc-sys2
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant