Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bless miri test
  • Loading branch information
joboet committed Aug 27, 2024
commit e9566ce9e92df5fbdf87260cef7f3aa8d096e1bd
4 changes: 3 additions & 1 deletion src/tools/miri/tests/fail/alloc/global_system_mixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

//@normalize-stderr-test: "using [A-Za-z]+ heap deallocation operation" -> "using PLATFORM heap deallocation operation"
//@normalize-stderr-test: "\| +\^+" -> "| ^"
//@normalize-stderr-test: "libc::free\([^()]*\)|unsafe \{ HeapFree\([^}]*\};" -> "FREE();"
//@normalize-stderr-test: "unsafe \{ libc::free\([^()]*\) \}|unsafe \{ HeapFree\([^}]*\};" -> "FREE();"
//@normalize-stderr-test: "alloc::[A-Za-z]+::" -> "alloc::PLATFORM::"
//@normalize-stderr-test: "alloc/[A-Za-z]+.rs" -> "alloc/PLATFORM.rs"

#![feature(allocator_api, slice_ptr_get)]

Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/tests/fail/alloc/global_system_mixup.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: Undefined Behavior: deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
--> RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC
--> RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC
|
LL | FREE();
| ^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::sys::pal::PLATFORM::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC
= note: inside `std::sys::alloc::PLATFORM::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC
note: inside `main`
--> $DIR/global_system_mixup.rs:LL:CC
Expand Down