diff options
| author | Ralf Jung <post@ralfj.de> | 2023-08-01 17:03:19 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-08-01 17:57:13 +0200 |
| commit | 8496292ddaec7696fa924d86cdea9ee26c1539b7 (patch) | |
| tree | 7a73f83d6a5b4c64aa1b815265ec93abe12ec1e2 /tests | |
| parent | 7d5886504caacb3e9073d54aaf0b8ee8289ebc7f (diff) | |
| download | rust-8496292ddaec7696fa924d86cdea9ee26c1539b7.tar.gz rust-8496292ddaec7696fa924d86cdea9ee26c1539b7.zip | |
properly track why we checked whether a pointer is in-bounds
also simplify the in-bounds checking in Miri's borrow trackers
Diffstat (limited to 'tests')
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr index 4eb1c42e1f7..b50ef0c68a1 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr @@ -2,13 +2,13 @@ error[E0080]: evaluation of constant value failed --> $DIR/dealloc_intrinsic_dangling.rs:10:5 | LL | &*ptr - | ^^^^^ pointer to alloc2 was dereferenced after this allocation got freed + | ^^^^^ dereferencing pointer failed: alloc2 has been freed, so this pointer is dangling error[E0080]: evaluation of constant value failed --> $DIR/dealloc_intrinsic_dangling.rs:18:5 | LL | *reference - | ^^^^^^^^^^ pointer to alloc4 was dereferenced after this allocation got freed + | ^^^^^^^^^^ dereferencing pointer failed: alloc4 has been freed, so this pointer is dangling error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr index 8177a08504b..0884ade45a7 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr @@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed --> $DIR/dealloc_intrinsic_duplicate.rs:9:5 | LL | intrinsics::const_deallocate(ptr, 4, 4); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc2 has been freed, so this pointer is dangling error: aborting due to previous error diff --git a/tests/ui/consts/const-eval/issue-49296.stderr b/tests/ui/consts/const-eval/issue-49296.stderr index cc4f1594c32..45ba0ea183e 100644 --- a/tests/ui/consts/const-eval/issue-49296.stderr +++ b/tests/ui/consts/const-eval/issue-49296.stderr @@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed --> $DIR/issue-49296.rs:9:16 | LL | const X: u64 = *wat(42); - | ^^^^^^^^ pointer to alloc3 was dereferenced after this allocation got freed + | ^^^^^^^^ dereferencing pointer failed: alloc3 has been freed, so this pointer is dangling error: aborting due to previous error |
