abort immediately on bad mem::zeroed/uninit
This commit is contained in:
parent
2d8651a927
commit
9f241b3a26
9 changed files with 55 additions and 34 deletions
|
@ -843,7 +843,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
|
|||
mir::TerminatorKind::Abort { .. } => {
|
||||
let instance = Instance::mono(
|
||||
tcx,
|
||||
tcx.require_lang_item(LangItem::PanicNoUnwind, Some(source)),
|
||||
tcx.require_lang_item(LangItem::PanicCannotUnwind, Some(source)),
|
||||
);
|
||||
if should_codegen_locally(tcx, &instance) {
|
||||
self.output.push(create_fn_mono_item(tcx, instance, source));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue