Skip to content

Miri terminator handling: only do progress sanity check for 'Call' terminator - #70771

Merged
bors merged 5 commits into
rust-lang:masterfrom
RalfJung:ctfe-loop
Apr 6, 2020
Merged

Miri terminator handling: only do progress sanity check for 'Call' terminator#70771
bors merged 5 commits into
rust-lang:masterfrom
RalfJung:ctfe-loop

Conversation

@RalfJung

Copy link
Copy Markdown
Member

This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here.

Fixes#70723
r? @oli-obk

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2020
@RalfJung
RalfJungforce-pushed the ctfe-loop branch 2 times, most recently from 8e736f2 to f8b6e83CompareApril 5, 2020 08:16
@bors

This comment has been minimized.

@@ -0,0 +1,5 @@
#![feature(const_loop)]

static _X: () = loop {}; //~ ERROR could not evaluate static initializer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how long does this test take? If more than a second, please lower the step limit

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It takes not even 200ms here:

$ time rustc +rustc.2-s1 src/test/ui/consts/const-eval/issue-70723.rs error[E0080]: could not evaluate static initializer
--> src/test/ui/consts/const-eval/issue-70723.rs:3:17
|
3 | static _X: () = loop {}; //~ ERROR could not evaluate static initializer
| ^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0080`.
real 0m0,125s
user 0m0,064s
sys 0m0,029s

@oli-obk

Copy link
Copy Markdown
Contributor

r=me after ensuring that the new test doesn't consume too much time

@RalfJung

Copy link
Copy Markdown
MemberAuthor

@bors r=oli-obk

@bors

bors commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e92bde3 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2020
@bors

bors commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e92bde3 with merge bd18bc9...

@bors

bors commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: oli-obk
Pushing bd18bc9 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 6, 2020
@bors
bors merged commit bd18bc9 into rust-lang:masterApr 6, 2020
@RalfJung
RalfJung deleted the ctfe-loop branch April 7, 2020 18:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE with #![feature(const_loop)] static _X: () = loop {};

4 participants

@RalfJung@bors@oli-obk@rust-highfive