Skip to content

Commit 30e0c30

Browse files
committed
Auto merge of #1619 - RalfJung:rustup, r=RalfJung
rustup
2 parents 2590bc6 + f31f00d commit 30e0c30

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5cdf5b882da9e8b7c73b5cadeb7745cb68f6ff63
1+
89631663b7ad2d46d3e4f52bcfa7bee2be9eb82b

src/shims/backtrace.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
8181
throw_unsup_format!("unknown `miri_resolve_frame` flags {}", flags);
8282
}
8383

84-
let ptr = match this.read_scalar(ptr)?.check_init()? {
85-
Scalar::Ptr(ptr) => ptr,
86-
Scalar::Raw { .. } => throw_ub_format!("expected a pointer in `rust_miri_resolve_frame`, found {:?}", ptr)
87-
};
84+
let ptr = this.force_ptr(this.read_scalar(ptr)?.check_init()?)?;
8885

8986
let fn_instance = if let Some(GlobalAlloc::Function(instance)) = this.tcx.get_global_alloc(ptr.alloc_id) {
9087
instance

tests/compile-fail/backtrace/bad-backtrace-ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extern "Rust" {
44

55
fn main() {
66
unsafe {
7-
miri_resolve_frame(0 as *mut _, 0); //~ ERROR Undefined Behavior: expected a pointer
7+
miri_resolve_frame(0 as *mut _, 0); //~ ERROR 0x0 is not a valid pointer
88
}
99
}

0 commit comments

Comments
 (0)