Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSegfault in safe code on Rust nightly when running rustc --emit=asm,link #26235
Comments
This comment has been minimized.
This comment has been minimized.
|
Seems to run fine on both 1.0 stable and a nightly on x86_64 Linux. |
sfackler
added
the
O-macos
label
Jun 12, 2015
This comment has been minimized.
This comment has been minimized.
|
Confirmed to segfault on OSX with stable rust. Also confirmed to have different IR with |
This comment has been minimized.
This comment has been minimized.
|
Finding it hard to reduce further than this testcase (the usual tricks for getting rid of stuff like fn main() {
use std::thread;
let ref foo = [(0, 0, 0, 0)];
vec![thread::Builder::new().spawn(|| ()).ok()];
{
let mut res = (0, 0, 0, 0);
for s in foo {
res = (s.0, s.1, s.2, s.3);
}
println!("{}{}", res.0, res.1);
}
} |
This comment has been minimized.
This comment has been minimized.
|
Interestingly, in a dummy implementation which includes thread::Builder, removing the mutex used for park / unpark seems to make the issue go away (no idea if that's the real problem though). |
This comment has been minimized.
This comment has been minimized.
crharris
commented
Aug 20, 2015
|
I also ran into a segfault with cargo on rust 1.2, but only when installing rust from homebrew. (OSX Yosemite 10.10.4) |
steveklabnik
added
the
I-unsound 💥
label
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
|
Tagging as unsound due to segfault in stable rust. |
bstrie
added
the
I-nominated
label
Nov 30, 2015
This comment has been minimized.
This comment has been minimized.
|
Nominating as this is a soundness bug that has yet to have a priority assigned. |
alexcrichton
added
the
T-compiler
label
Dec 16, 2015
This comment has been minimized.
This comment has been minimized.
|
triage: P-medium Believed to be specific to |
rust-highfive
added
P-medium
and removed
I-nominated
labels
Dec 17, 2015
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton you're seeing the same asm from --emit=asm because that happens first, because the codegen for the link output breaks things. You do get different asm if you look at the output from |
This comment has been minimized.
This comment has been minimized.
|
... that's using |
pythonesque commentedJun 12, 2015
This reliably segfaults for me on a 13 inch 2015 Macbook Air running OS X Yosemite. I'm not sure what the culprit is yet; it might be trans. I haven't tested it with stable yet.
Maybe related to #24876 ?