-
Notifications
You must be signed in to change notification settings - Fork 263
Don't use mmap on macOS #302
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ab06897
Add regression test for SIGPIPE on macOS
Aaron1011 b585df8
Disable `mmap` on macOS
Aaron1011 ed000ab
Run `cargo fmt`
Aaron1011 23328fe
Remove unused variable name
Aaron1011 86e4a37
s/macos/darwin/
Aaron1011 99a78f4
Move macOS test to its own file
Aaron1011 997edab
Move macOS dSYM test to its own directory
Aaron1011 3c90856
Remove 'darwin' check to verify new test
Aaron1011 e482844
Fix rustfmt
Aaron1011 cadd87c
Re-add darwin check
Aaron1011 3cc3e07
Move macOS test to a non-workspace crate
Aaron1011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copied from https://github.com/rust-lang/rust/blob/2cb0b8582ebbf9784db9cec06fff517badbf4553/src/test/ui/issues/issue-45731.rs | ||
// This needs to go in its own file, since it modifies the dSYM | ||
// for the entire test | ||
#[test] | ||
#[cfg(target_os = "macos")] | ||
fn simple_test() { | ||
use std::{env, fs, panic}; | ||
|
||
// Find our dSYM and replace the DWARF binary with an empty file | ||
let mut dsym_path = env::current_exe().unwrap(); | ||
let executable_name = dsym_path.file_name().unwrap().to_str().unwrap().to_string(); | ||
assert!(dsym_path.pop()); // Pop executable | ||
dsym_path.push(format!( | ||
"{}.dSYM/Contents/Resources/DWARF/{0}", | ||
executable_name | ||
)); | ||
{ | ||
let _ = fs::OpenOptions::new() | ||
.read(false) | ||
.write(true) | ||
.truncate(true) | ||
.create(false) | ||
.open(&dsym_path) | ||
.unwrap(); | ||
} | ||
|
||
env::set_var("RUST_BACKTRACE", "1"); | ||
|
||
// We don't need to die of panic, just trigger a backtrace | ||
let _ = panic::catch_unwind(|| { | ||
assert!(false); | ||
}); | ||
Aaron1011 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.