forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ConstProp] Avoid OOM crashes by not evaluating large Places
Fix spurious CI filures due to OOM Fixes rust-lang#66397
- Loading branch information
1 parent
1463fed
commit ea9878b
Showing
3 changed files
with
29 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// check-pass | ||
// only-x86_64 | ||
|
||
// Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. | ||
|
||
fn foo() -> [u8; 4 * 1024 * 1024 * 1024 * 1024] { | ||
unimplemented!() | ||
} | ||
|
||
fn main() { | ||
foo(); | ||
} |
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,8 @@ | ||
// check-pass | ||
// only-x86_64 | ||
|
||
// Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. | ||
|
||
fn main() { | ||
[0; 4 * 1024 * 1024 * 1024 * 1024]; | ||
} |