-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #130303 - Zalathar:rollup-8vsqdox, r=Zalathar
Rollup of 3 pull requests Successful merges: - #130245 (make basic allocation functions track_caller in Miri for nicer backtraces) - #130261 (skip target sanity check when it's a `local-rebuild`) - #130287 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 9)) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
52 changed files
with
117 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
use std::alloc::{alloc, dealloc, Layout}; | ||
|
||
//@error-in-other-file: has size 1 and alignment 1, but gave size 1 and alignment 2 | ||
|
||
fn main() { | ||
unsafe { | ||
let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 2)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 2)); //~ERROR: has size 1 and alignment 1, but gave size 1 and alignment 2 | ||
} | ||
} |
13 changes: 4 additions & 9 deletions
13
src/tools/miri/tests/fail/alloc/deallocate-bad-alignment.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
use std::alloc::{alloc, dealloc, Layout}; | ||
|
||
//@error-in-other-file: has size 1 and alignment 1, but gave size 2 and alignment 1 | ||
|
||
fn main() { | ||
unsafe { | ||
let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(2, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(2, 1)); //~ERROR: has size 1 and alignment 1, but gave size 2 and alignment 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
use std::alloc::{alloc, dealloc, Layout}; | ||
|
||
//@error-in-other-file: has been freed | ||
|
||
fn main() { | ||
unsafe { | ||
let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 1)); //~ERROR: has been freed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
use std::alloc::{alloc, realloc, Layout}; | ||
|
||
//@error-in-other-file: has size 1 and alignment 1, but gave size 2 and alignment 1 | ||
|
||
fn main() { | ||
unsafe { | ||
let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ||
let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1); | ||
let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1); //~ERROR: has size 1 and alignment 1, but gave size 2 and alignment 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
use std::alloc::{alloc, dealloc, realloc, Layout}; | ||
|
||
//@error-in-other-file: has been freed | ||
|
||
fn main() { | ||
unsafe { | ||
let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ||
dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ||
let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); | ||
let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); //~ERROR: has been freed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/tools/miri/tests/fail/both_borrows/zero-sized-protected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.