rustup
This commit is contained in:
parent
2590bc64fe
commit
f31f00d5af
3 changed files with 3 additions and 6 deletions
|
|
@ -1 +1 @@
|
|||
5cdf5b882da9e8b7c73b5cadeb7745cb68f6ff63
|
||||
89631663b7ad2d46d3e4f52bcfa7bee2be9eb82b
|
||||
|
|
|
|||
|
|
@ -81,10 +81,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
throw_unsup_format!("unknown `miri_resolve_frame` flags {}", flags);
|
||||
}
|
||||
|
||||
let ptr = match this.read_scalar(ptr)?.check_init()? {
|
||||
Scalar::Ptr(ptr) => ptr,
|
||||
Scalar::Raw { .. } => throw_ub_format!("expected a pointer in `rust_miri_resolve_frame`, found {:?}", ptr)
|
||||
};
|
||||
let ptr = this.force_ptr(this.read_scalar(ptr)?.check_init()?)?;
|
||||
|
||||
let fn_instance = if let Some(GlobalAlloc::Function(instance)) = this.tcx.get_global_alloc(ptr.alloc_id) {
|
||||
instance
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ extern "Rust" {
|
|||
|
||||
fn main() {
|
||||
unsafe {
|
||||
miri_resolve_frame(0 as *mut _, 0); //~ ERROR Undefined Behavior: expected a pointer
|
||||
miri_resolve_frame(0 as *mut _, 0); //~ ERROR 0x0 is not a valid pointer
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue