Skip to content

[MIR] Stage1 libcore crashes with SIGILL on ARM #34427

Closed
@MagaTailor

Description

@MagaTailor

Since a few days ago, I'm unable to bootstrap rustc on ARM. Stage0 passes ok, but then during libcore compilation I'm getting a consistent crash:

(gdb) run
Starting program: ../arm-unknown-linux-gnueabihf/stage1/bin/rustc --cfg stage1 -C codegen-units=1 -C target-cpu=cortex-a5 -C target-feature=-neon,-slowfpvmlx -Z orbit -C link-args=-s -O --cfg rtopt -C rpath -C prefer-dynamic --target=arm-unknown-linux-gnueabihf -C target-feature=+v7,+vfp3 -L arm-unknown-linux-gnueabihf/rt -L native=../arm-unknown-linux-gnueabihf/llvm/Release/lib --out-dir arm-unknown-linux-gnueabihf/stage1/lib/rustlib/arm-unknown-linux-gnueabihf/lib -C extra-filename=-fe3cdf61 -C metadata=fe3cdf61 src/libcore/lib.rs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb23c8280 (LWP 10171)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0xb23c8280 (LWP 10171)]
0xb5ccd4c8 in rustc_trans::mir::constant::MirConstContext::new::hfbf8e74461aa3c9a ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
(gdb) bt
#0  0xb5ccd4c8 in rustc_trans::mir::constant::MirConstContext::new::hfbf8e74461aa3c9a ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#1  0xb5cca2bc in rustc_trans::mir::constant::_$LT$impl$u20$mir..MirContext$LT$$u27$bcx$C$$u20$$u27$tcx$GT$$GT$::trans_constant::h0fc06663a5c5fd5c () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#2  0xb5cc97e8 in rustc_trans::mir::operand::_$LT$impl$u20$mir..MirContext$LT$$u27$bcx$C$$u20$$u27$tcx$GT$$GT$::trans_operand::hf76be65ffae28ad3 () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#3  0xb5cda61c in rustc_trans::mir::rvalue::_$LT$impl$u20$mir..MirContext$LT$$u27$bcx$C$$u20$$u27$tcx$GT$$GT$::trans_rvalue_operand::hd939e0a331e9c597 () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#4  0xb5cbff28 in rustc_trans::mir::block::_$LT$impl$u20$mir..MirContext$LT$$u27$bcx$C$$u20$$u27$tcx$GT$$GT$::trans_block::hb1d87007c9e87f30 () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#5  0xb5ba9aa8 in rustc_trans::mir::trans_mir::hf51ccc32c7a8ddd3 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#6  0xb5ba1ff0 in rustc_trans::base::trans_closure::hcb1c30ddf81aba40 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#7  0xb5bab570 in rustc_trans::base::trans_fn::h1508ebeec7351f87 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#8  0xb5bb8950 in rustc_trans::base::trans_item::hd6a260625a685bf2 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#9  0xb5bd3e10 in _$LT$base..TransItemsWithinModVisitor$LT$$u27$a$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..hir..intravisit..Visitor$LT$$u27$v$GT$$GT$::visit_item::heb661116fa8a1e87 () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#10 0xb5bd2524 in rustc::hir::intravisit::walk_item::hf7ed747a4fa46491 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#11 0xb5bcbbe4 in _$LT$base..TransModVisitor$LT$$u27$a$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..hir..intravisit..Visitor$LT$$u27$v$GT$$GT$::visit_item::h65d871e71b3668c9 () from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#12 0xb5bbf8ec in rustc_trans::base::trans_crate::hca67d2711539a441 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_trans-fe3cdf61.so
#13 0xb6e06194 in rustc_driver::driver::phase_4_translate_to_llvm::h5f028163cc963293 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
#14 0xb6e04640 in rustc_driver::driver::compile_input::_$u7b$$u7b$closure$u7d$$u7d$::h540343a1efd859c9 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
#15 0xb6e10f78 in rustc_driver::driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::h0c96940e550f2879 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
#16 0xb6e16264 in rustc::ty::context::TyCtxt::create_and_enter::h167e75cbc44e6d50 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
#17 0xb6e0a56c in rustc_driver::driver::phase_3_run_analysis_passes::h75db68819aee0b65 ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
#18 0xb6dd47b8 in rustc_driver::driver::compile_input::h5e5e4501615d7d4b ()
   from ../arm-unknown-linux-gnueabihf/stage1/lib/librustc_driver-fe3cdf61.so
Backtrace stopped: Cannot access memory at address 0x1d1cfff8
(gdb) disass 0xb5ccd4c8,+1
Dump of assembler code from 0xb5ccd4c8 to 0xb5ccd4c9:
=> 0xb5ccd4c8 <_ZN11rustc_trans3mir8constant15MirConstContext3new17hfbf8e74461aa3c9aE+404>:     str     r0, [r0, r8]!

Before getting that trace I had no idea it was related to MIR in any way. I'll have to give old trans a shot.

EDIT:
Yeah, old trans chugs along without a hitch.

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions