Skip to content

Add RISC-V 64 TLS support and atomic yield functionality#1305

Open
mengzhuo wants to merge 8 commits into
microsoft:mainfrom
mengzhuo:riscv64
Open

Add RISC-V 64 TLS support and atomic yield functionality#1305
mengzhuo wants to merge 8 commits into
microsoft:mainfrom
mengzhuo:riscv64

Conversation

@mengzhuo

@mengzhuo mengzhuo commented Jun 5, 2026

Copy link
Copy Markdown

No description provided.

daanx and others added 4 commits May 3, 2026 17:06
The macOS malloc zone advertises version >= 9, for which libmalloc invokes
introspect->reinit_lock from the atfork_child handler (_malloc_fork_child)
without a NULL check. The introspection struct left reinit_lock unset (NULL),
so any fork() in a process that statically links the mimalloc zone made the
child jump to address 0 and crash (EXC_BAD_ACCESS at 0x0) on macOS 15.

Provide a no-op reinit_lock: mimalloc has no zone-level locks to reinitialize
after fork.
fix(osx): implement introspect.reinit_lock to avoid fork() crash
Comment thread include/mimalloc/prim.h Outdated
Comment thread include/mimalloc/prim.h Outdated
@daanx

daanx commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks so much! Once we resolve the comments, can you rebase this commit on dev instead? (if it is too much hassle, I can also manually apply).

@mengzhuo

Copy link
Copy Markdown
Author

Thanks for review, all done

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.

3 participants