Fix miri too

This commit is contained in:
Michael Goulet 2024-05-14 16:45:54 -04:00
parent bd0d306c14
commit 917bb8396c
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
fn main() {
let frames = unsafe { miri_get_backtrace(0) };
for frame in frames.into_iter() {
for frame in frames.iter() {
unsafe {
miri_resolve_frame(*frame, 0); //~ ERROR: Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 5 fields
}

View File

@ -27,7 +27,7 @@ fn func_d() -> Box<[*mut ()]> {
fn main() {
let mut seen_main = false;
let frames = func_a();
for frame in frames.into_iter() {
for frame in frames.iter() {
let miri_frame = unsafe { miri_resolve_frame(*frame, 0) };
let name = String::from_utf8(miri_frame.name.into()).unwrap();
let filename = String::from_utf8(miri_frame.filename.into()).unwrap();

View File

@ -32,7 +32,7 @@ fn func_d() -> Box<[*mut ()]> {
fn main() {
let mut seen_main = false;
let frames = func_a();
for frame in frames.into_iter() {
for frame in frames.iter() {
let miri_frame = unsafe { miri_resolve_frame(*frame, 1) };
let mut name = vec![0; miri_frame.name_len];