Don't crash when local variables are too big to store on the stack
This commit is contained in:
parent
5fcedf62df
commit
cd96988436
@ -324,6 +324,12 @@ impl<'tcx> CPlace<'tcx> {
|
||||
};
|
||||
}
|
||||
|
||||
if layout.size.bytes() >= u64::from(u32::MAX - 16) {
|
||||
fx.tcx
|
||||
.sess
|
||||
.fatal(&format!("values of type {} are too big to store on the stack", layout.ty));
|
||||
}
|
||||
|
||||
let stack_slot = fx.bcx.create_stack_slot(StackSlotData {
|
||||
kind: StackSlotKind::ExplicitSlot,
|
||||
// FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
|
||||
|
Loading…
x
Reference in New Issue
Block a user