Skip to content

Commit

Permalink
Fix miri too
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 20, 2024
1 parent bd0d306 commit 917bb83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern "Rust" {

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
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/backtrace/backtrace-api-v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/backtrace/backtrace-api-v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 917bb83

Please sign in to comment.