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

Conversation

Projects
None yet
6 participants
@Shizmob
Copy link
Contributor

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.

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, prefix the jemalloc symbols instead.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Apr 8, 2017

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

This comment has been minimized.

Copy link
Member

alexcrichton commented Apr 10, 2017

@bors: r+

Thanks!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 10, 2017

📌 Commit 536011d has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 10, 2017

Rollup merge of rust-lang#41168 - Shizmob:jemalloc-musl, r=alexcrichton
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 rust-lang#40113). It may not show up immediately obviously on the current statically-linked CRT targets.

bors added a commit that referenced this pull request Apr 10, 2017

Auto merge of #41188 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #40018, #41096, #41168, #41183
- Failed merges:

bors added a commit that referenced this pull request Apr 10, 2017

Auto merge of #41188 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #40018, #41096, #41168, #41183
- Failed merges:

bors added a commit that referenced this pull request Apr 10, 2017

Auto merge of #41188 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #40018, #41096, #41168, #41183
- Failed merges:
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 11, 2017

⌛️ Testing commit 536011d with merge bc759cd...

bors added a commit that referenced this pull request Apr 11, 2017

Auto merge of #41168 - Shizmob:jemalloc-musl, r=alexcrichton
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

This comment has been minimized.

Copy link
Contributor

bors commented Apr 11, 2017

💔 Test failed - status-travis

@TimNN

This comment has been minimized.

Copy link
Contributor

TimNN commented Apr 11, 2017

@bors retry

@bors

This comment has been minimized.

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

Auto merge of #41168 - Shizmob:jemalloc-musl, r=alexcrichton
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

This comment has been minimized.

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@Shizmob Shizmob deleted the Shizmob:jemalloc-musl branch Apr 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.