make sure we find some things without validation or stacked borrows, respectively
This commit is contained in:
parent
179e78d0ad
commit
e6822d60b3
8 changed files with 18 additions and 6 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// Make sure we catch this even without validation
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
|
||||
// Make sure that we cannot load from memory a `&mut` that got already invalidated.
|
||||
fn main() {
|
||||
let x = &mut 42;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// Make sure we catch this even without validation
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
|
||||
// Make sure that we cannot load from memory a `&` that got already invalidated.
|
||||
fn main() {
|
||||
let x = &mut 42;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// This should fail even without validation
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
// This should fail even without validation or Stacked Borrows.
|
||||
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
|
||||
|
||||
fn main() {
|
||||
let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// This should fail even without validation.
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
// This should fail even without validation or Stacked Borrows.
|
||||
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
|
||||
|
||||
fn main() {
|
||||
let x = [2u32, 3]; // Make it big enough so we don't get an out-of-bounds error.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// This should fail even without validation.
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
// This should fail even without validation or Stacked Borrows.
|
||||
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
|
||||
|
||||
fn main() {
|
||||
let x = [2u16, 3, 4, 5]; // Make it big enough so we don't get an out-of-bounds error.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Make sure we catch this even without Stacked Borrows
|
||||
// compile-flags: -Zmiri-disable-stacked-borrows
|
||||
use std::mem;
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Make sure we catch this even without Stacked Borrows
|
||||
// compile-flags: -Zmiri-disable-stacked-borrows
|
||||
use std::mem;
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Make sure we catch this even without Stacked Borrows
|
||||
// compile-flags: -Zmiri-disable-stacked-borrows
|
||||
use std::mem;
|
||||
|
||||
fn dangling() -> *const u8 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue