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

Disable mmap in libbacktrace on Apple platforms #45866

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

JohnColanduoni
Copy link
Contributor

Fixes #45731

libbacktrace uses mmap if available to map ranges of the files containing debug information. On macOS mmap will succeed even if the mapped range does not exist, and a SIGBUS (with an unusual EXC_BAD_ACCESS code 10) will occur when the program attempts to page in the memory. To combat this we force libbacktrace to be built with the simple read based fallback on Apple platforms.

Fixes rust-lang#45731

libbacktrace uses mmap if available to map ranges of the files containing debug information. On macOS `mmap` will succeed even if the mapped range does not exist, and a SIGBUS (with an unusual EXC_BAD_ACCESS code 10) will occur when the program attempts to page in the memory. To combat this we force `libbacktrace` to be built with the simple `read` based fallback on Apple platforms.
@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2017
@kennytm
Copy link
Member

kennytm commented Nov 8, 2017

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+ p=1

Thanks for the fix @JohnColanduoni!

@bors
Copy link
Contributor

bors commented Nov 8, 2017

📌 Commit 8581b59 has been approved by alexcrichton

@alexcrichton alexcrichton added beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2017
@bors
Copy link
Contributor

bors commented Nov 8, 2017

⌛ Testing commit 8581b59 with merge 6e29774...

bors added a commit that referenced this pull request Nov 8, 2017
Disable `mmap`  in `libbacktrace` on Apple platforms

Fixes #45731

libbacktrace uses mmap if available to map ranges of the files containing debug information. On macOS `mmap` will succeed even if the mapped range does not exist, and a SIGBUS (with an unusual EXC_BAD_ACCESS code 10) will occur when the program attempts to page in the memory. To combat this we force `libbacktrace` to be built with the simple `read` based fallback on Apple platforms.
@bors
Copy link
Contributor

bors commented Nov 8, 2017

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

@bors bors merged commit 8581b59 into rust-lang:master Nov 8, 2017
@Mark-Simulacrum Mark-Simulacrum added beta-nominated Nominated for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Nov 12, 2017
@Mark-Simulacrum Mark-Simulacrum mentioned this pull request Nov 12, 2017
bors added a commit that referenced this pull request Nov 13, 2017
Beta next

This updates beta Cargo (brings rust-lang/cargo#4716 and rust-lang/cargo#4715), and also includes #45866.

This PR also bumps beta to .3 so that we can get a beta release soon.
@nikomatsakis nikomatsakis removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 16, 2017
@nikomatsakis
Copy link
Contributor

Bacported in #45948.

@durka
Copy link
Contributor

durka commented Nov 28, 2017

There are no line numbers anymore in the latest nightly. What happened?

@kennytm kennytm mentioned this pull request May 22, 2018
@RalfJung RalfJung mentioned this pull request Mar 9, 2020
Aaron1011 added a commit to Aaron1011/backtrace-rs that referenced this pull request Mar 9, 2020
alexcrichton pushed a commit to rust-lang/backtrace-rs that referenced this pull request Mar 10, 2020
* Add regression test for SIGPIPE on macOS

* Disable `mmap` on macOS

See rust-lang/rust#45866 for more details

* Run `cargo fmt`

* Remove unused variable name

* s/macos/darwin/

* Move macOS test to its own file

* Move macOS dSYM test to its own directory

* Remove 'darwin' check to verify new test

* Fix rustfmt

* Re-add darwin check

* Move macOS test to a non-workspace crate
Gantarjev15 added a commit to Gantarjev15/backtrace-rs that referenced this pull request Sep 9, 2024
* Add regression test for SIGPIPE on macOS

* Disable `mmap` on macOS

See rust-lang/rust#45866 for more details

* Run `cargo fmt`

* Remove unused variable name

* s/macos/darwin/

* Move macOS test to its own file

* Move macOS dSYM test to its own directory

* Remove 'darwin' check to verify new test

* Fix rustfmt

* Re-add darwin check

* Move macOS test to a non-workspace crate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants