Skip to content

32bit linux binary illegal instruction crash #24668

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

Closed
MagaTailor opened this issue Apr 21, 2015 · 5 comments
Closed

32bit linux binary illegal instruction crash #24668

MagaTailor opened this issue Apr 21, 2015 · 5 comments
Labels
A-codegen Area: Code generation A-cross Area: Cross compilation

Comments

@MagaTailor
Copy link

The official beta2 binary crashes on my 32bit athlon xp processor.

Program received signal SIGILL, Illegal instruction.
0xb58fb410 in llvm::sys::MemoryFence() () from ../lib/librustc_llvm-4e7c5e5c.so
(gdb) bt
#0  0xb58fb410 in llvm::sys::MemoryFence() ()
   from ../lib/librustc_llvm-4e7c5e5c.so
#1  0xb58bc145 in llvm::PassRegistry::getPassRegistry() ()
   from ../lib/librustc_llvm-4e7c5e5c.so
#2  0xb58bb1ac in llvm::PassNameParser::PassNameParser() ()
   from ../lib/librustc_llvm-4e7c5e5c.so
#3  0xb589f23c in llvm::cl::list<llvm::PassInfo const*, bool, llvm::PassNameParser>::list<char [13], llvm::cl::desc, llvm::cl::OptionHidden>(char const (&) [13], llvm::cl::desc const&, llvm::cl::OptionHidden const&) ()
   from ../lib/librustc_llvm-4e7c5e5c.so
#4  0xb58a930e in _GLOBAL__sub_I_LegacyPassManager.cpp ()
   from ../lib/librustc_llvm-4e7c5e5c.so
#5  0xb7fec9ee in call_init.part () from /lib/ld-linux.so.2
#6  0xb7fecae4 in _dl_init () from /lib/ld-linux.so.2
#7  0xb7fddd5f in _dl_start_user () from /lib/ld-linux.so.2
@MagaTailor
Copy link
Author

Btw, if this crash is caused by cross compiling on a 64bit machine leaving all SSE instruction sets on, you've just created a circular dependency in the 32bit build process (i.e. it won't be possible to build rust from source which requires a working rustc binary)

@steveklabnik steveklabnik added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-cross Area: Cross compilation labels Apr 21, 2015
@nagisa
Copy link
Member

nagisa commented Apr 21, 2015

rust-lang/cargo#958 related. Especially relevant is this comment.

@nagisa
Copy link
Member

nagisa commented Apr 21, 2015

It might be nice to have builds for absolute baseline architecture (8086-ish with 8087?) so one could run rust on ancient hardware. Not sure whether LLVM even supports that, though.

@steveklabnik steveklabnik added I-wrong A-codegen Area: Code generation and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Apr 21, 2015
@MagaTailor
Copy link
Author

It seems it's possible to run rustc/cargo using qemu-i386 userspace translation.
Even though qemu-i386 prints 'unsupported syscall 355' and rustc tends to crash with a segfault it happens right after finishing compilation so in spite of the error the output is ready.

@MagaTailor
Copy link
Author

I was able to create a fully working stable rustc/cargo build for the generic i686 architecture.

It can be downloaded from here:
https://www.dropbox.com/s/1sguenpkvjmg6z2/rust-1.3.0-i686_generic-linux.tar.bz2?dl=0

and the 20151002 nightly from here:

https://www.dropbox.com/s/7zl2whf1t9mbhh1/rust-1.5.0-i686_generic_linux.tar.bz2?dl=0

while a generic i686 stage0 snapshot from here:

https://www.dropbox.com/s/a2txw5iafxyz2eo/stage0-i686_generic-2015-08-11.tar.bz2?dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-cross Area: Cross compilation
Projects
None yet
Development

No branches or pull requests

3 participants