Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jemalloc support for musl #41168

Merged
merged 1 commit into from
Apr 11, 2017
Merged

Fix jemalloc support for musl #41168

merged 1 commit into from
Apr 11, 2017

Conversation

shizmob
Copy link
Contributor

@shizmob shizmob commented Apr 8, 2017

Just like DragonFlyBSD, using the same symbols as the system allocator will result in a segmentation fault at runtime due to allocator mismatches. As such, it's better to prefix the jemalloc symbols instead, avoiding crashes.

We encountered this problem on a dynamically-linked musl target (with patches to Rust to make that possible, see #40113). It may not show up immediately obviously on the current statically-linked CRT targets.

Just like DragonFlyBSD, using the same symbols as the system allocator will
result in a segmentation fault at runtime due to allocator mismatches.
As such, prefix the jemalloc symbols instead.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Apr 10, 2017

📌 Commit 536011d has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 11, 2017

⌛ Testing commit 536011d with merge bc759cd...

@bors
Copy link
Contributor

bors commented Apr 11, 2017

💔 Test failed - status-travis

@TimNN
Copy link
Contributor

TimNN commented Apr 11, 2017

@bors
Copy link
Contributor

bors commented Apr 11, 2017

⌛ Testing commit 536011d with merge 6edc596...

bors added a commit that referenced this pull request Apr 11, 2017
Fix jemalloc support for musl

Just like DragonFlyBSD, using the same symbols as the system allocator will result in a segmentation fault at runtime due to allocator mismatches. As such, it's better to prefix the jemalloc symbols instead, avoiding crashes.

We encountered this problem on a dynamically-linked musl target (with patches to Rust to make that possible, see #40113). It may not show up immediately obviously on the current statically-linked CRT targets.
@bors
Copy link
Contributor

bors commented Apr 11, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 6edc596 to master...

@bors bors merged commit 536011d into rust-lang:master Apr 11, 2017
@shizmob shizmob deleted the jemalloc-musl branch April 19, 2017 00:21
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.

6 participants