-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
miri: fix ICE with symbolic alignment check on extern static
- Loading branch information
Showing
8 changed files
with
76 additions
and
27 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
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
12 changes: 12 additions & 0 deletions
12
src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@compile-flags: -Zmiri-symbolic-alignment-check | ||
|
||
extern "C" { | ||
static _dispatch_queue_attr_concurrent: [u8; 0]; | ||
} | ||
|
||
static DISPATCH_QUEUE_CONCURRENT: &'static [u8; 0] = | ||
unsafe { &_dispatch_queue_attr_concurrent }; | ||
|
||
fn main() { | ||
let _val = *DISPATCH_QUEUE_CONCURRENT; //~ERROR: is not supported | ||
} |
14 changes: 14 additions & 0 deletions
14
src/tools/miri/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unsupported operation: `extern` static `_dispatch_queue_attr_concurrent` from crate `issue_miri_3288_ice_symbolic_alignment_extern_static` is not supported by Miri | ||
--> $DIR/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC | ||
| | ||
LL | let _val = *DISPATCH_QUEUE_CONCURRENT; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `extern` static `_dispatch_queue_attr_concurrent` from crate `issue_miri_3288_ice_symbolic_alignment_extern_static` is not supported by Miri | ||
| | ||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support | ||
= note: BACKTRACE: | ||
= note: inside `main` at $DIR/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC | ||
|
||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace | ||
|
||
error: aborting due to 1 previous error | ||
|
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