commit
30e0c303a0
@ -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…
x
Reference in New Issue
Block a user