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 upIn cross-compiled i686->x86_64 code, thread::spawn crashes on my system #31139
Comments
vi
changed the title
In cross-compiled code, thread::spawn crashes on my system
In cross-compiled i686->x86_64 code, thread::spawn crashes on my system
Jan 23, 2016
This comment has been minimized.
This comment has been minimized.
|
Is there a way that this could be reproduced locally? Either through a VM or perhaps a docker container? |
This comment has been minimized.
This comment has been minimized.
|
What shall be in the VM? Just a minimal system to reproduce the crash itself or also full Rust toolchain? |
This comment has been minimized.
This comment has been minimized.
You can try yourself by downloading the qcow2 image. Select amd64 kernel in grub, use root:root to login. I'll add the link soonish. |
This comment has been minimized.
This comment has been minimized.
|
Link to the VM image (not sure if the link will actually download): magnet:?xt=urn:btih:e0493de828e6a0b569c26d66190844f76c899f0c&tr=http%3A%2F%2Ftracker.nl-2000.com%3A6969%2Fannounce%00 |
This comment has been minimized.
This comment has been minimized.
|
Alternative easier link: http://vi-server.org/pub/debian_wheezy_i386+amd64_rust.qcow2 |
This comment has been minimized.
This comment has been minimized.
|
@vi your linked donwloaded ok but I unfortunately can't seem to reproduce just yet, I'm getting:
Is there a special way that qemu needs to be invoked or is there something else going on? |
This comment has been minimized.
This comment has been minimized.
Have you did this? It's not default. There is GRUB menu at start of the VM. |
This comment has been minimized.
This comment has been minimized.
|
Hm no, I only have a |
This comment has been minimized.
This comment has been minimized.
|
You can make amd64 kernel to boot by default.
|
This comment has been minimized.
This comment has been minimized.
|
You can also update the image (I performed and uploaded those changes): rsync://vi-server.org/pub/debian_wheezy_i386+amd64_rust.qcow2 |
This comment has been minimized.
This comment has been minimized.
|
cc @pnkfelix, this looks like a bug in dropck maybe? This is reproducible (on linux) via: os=unknown-linux-gnu
target=x86_64-$os
host=i686-$os
curl https://static.rust-lang.org/dist/rustc-nightly-$host.tar.gz | tar xzf -
./rustc-nightly-$host/install.sh --prefix=install
curl https://static.rust-lang.org/dist/rust-std-nightly-$target.tar.gz | \
tar xzf - --strip-components=4 -C install/lib/rustlib \
rust-std-nightly-$target/rust-std-$target/lib/rustlib
echo 'fn main() { std::thread::spawn(|| {}).join().unwrap(); }' |
PATH=`pwd`/install/bin:$PATH \
LD_LIBRARY_PATH=`pwd`/install/lib \
rustc - -o foo --target $target
./foo It looks like this is a bug with any 32->64 compilation, and at least on Linux for me the faulting instruction is:
Seems suspicious! |
alexcrichton
added
the
T-compiler
label
Jan 26, 2016
This comment has been minimized.
This comment has been minimized.
|
triage: I-nominated |
rust-highfive
added
the
I-nominated
label
Jan 26, 2016
This comment has been minimized.
This comment has been minimized.
|
also just cc @rust-lang/compiler |
This comment has been minimized.
This comment has been minimized.
|
By dropck, I guess you mean a potential buy in the translation of drops? |
This comment has been minimized.
This comment has been minimized.
|
|
pnkfelix
self-assigned this
Jan 26, 2016
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis oh right sorry, I should have clarified there @dotdash that sounds like it'd do the trick! |
This comment has been minimized.
This comment has been minimized.
|
ah yeah I hadn't imagined someone cross-compiling to x64 from i686. Total oversight in my part on making that API. |
This comment has been minimized.
This comment has been minimized.
|
triage: P-high |
vi commentedJan 23, 2016
Session: