microsoft / microsoft/mimalloc
Musl doesn't support init-exec tls
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi!. We are studying using mimalloc as the malloc for julia. While doing this, we found an error on musl, where if you statically link mimalloc to a shared library, then dlopen it. You get `Error relocating /workspace/mimalloc/build/test.so: __errno_location: initial-exec TLS resolves to dynamic definition in /workspace/mimalloc/build/test.so`.
While the issue is simple enough to solve in our case, just build it with `-DMI_LOCAL_DYNAMIC_TLS=ON` on musl, it would be more correct if the build system detected it was targeting musl and did that automatically.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test. Start by locating the build-system handling of MI_LOCAL_DYNAMIC_TLS and the target-platform detection used for musl. Reproduce the static mimalloc/shared-library dlopen case described, then verify that musl builds select dynamic TLS automatically without requiring the manual option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100