Throw validation failure for InvalidUndefBytes.
This commit is contained in:
parent
bc7b7140b9
commit
6b413d95fc
1 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ use std::ops::RangeInclusive;
|
|||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::mir::interpret::{InterpError, InterpErrorInfo};
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
|
|
@ -492,7 +493,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
|
|||
// that lets us re-use `ref_to_mplace`).
|
||||
let place = try_validation_pat!(
|
||||
self.ecx.ref_to_mplace(self.ecx.read_immediate(value)?),
|
||||
_,
|
||||
InterpErrorInfo { kind: err_ub!(InvalidUndefBytes(..)), ..},
|
||||
"uninitialized raw pointer",
|
||||
self.path
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue