Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show better error message for Windows abnormal termination. #7535

Merged
merged 1 commit into from Oct 24, 2019

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Oct 23, 2019

This helps display better error messages when there is an abnormal termination on Windows.

If rustc crashes, there was a slight mistake in #6270, where the error code was actually negative, so the message was getting hidden behind the --verbose flag. This changes it show that the abnormal error is always shown if rustc crashes in an unusual way.

This also changes cargo test to display a better message if the test crashes. Previously:

running 1 test
error: test failed, to rerun pass '--bin crash'

New:

running 1 test
error: test failed, to rerun pass '--bin crash'

Caused by:
  process didn't exit successfully: `D:\Temp\crash\target\debug\deps\crash-b3c2389529da3d3e.exe` (exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)

I didn't add any tests because testing on this on Windows seems a little precarious. AFAIK, the exact error message depends on the processor (like x86 vs i686), and Windows version. I was concerned about chasing down every little nuance, though I'm willing to try if it seems important.

Fixes rust-lang/rust#65692 (I think).

@rust-highfive
Copy link

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2019
@alexcrichton
Copy link
Member

@bors: r+

Thanks for digging into this! Agreed that it's fine to not have a test for this since we're unlikely to regress this manually and it's verified.

@bors
Copy link
Collaborator

bors commented Oct 23, 2019

📌 Commit 78b1400 has been approved by alexcrichton

@bors bors 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 Oct 23, 2019
@bors
Copy link
Collaborator

bors commented Oct 23, 2019

⌛ Testing commit 78b1400 with merge d846542...

bors added a commit that referenced this pull request Oct 23, 2019
Show better error message for Windows abnormal termination.

This helps display better error messages when there is an abnormal termination on Windows.

If rustc crashes, there was a slight mistake in #6270, where the error code was actually negative, so the message was getting hidden behind the `--verbose` flag.  This changes it show that the abnormal error is always shown if rustc crashes in an unusual way.

This also changes `cargo test` to display a better message if the test crashes.  Previously:

```
running 1 test
error: test failed, to rerun pass '--bin crash'
```

New:

```
running 1 test
error: test failed, to rerun pass '--bin crash'

Caused by:
  process didn't exit successfully: `D:\Temp\crash\target\debug\deps\crash-b3c2389529da3d3e.exe` (exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)
```

I didn't add any tests because testing on this on Windows seems a little precarious.  AFAIK, the exact error message depends on the processor (like x86 vs i686), and Windows version.  I was concerned about chasing down every little nuance, though I'm willing to try if it seems important.

Fixes rust-lang/rust#65692 (I think).
@bors
Copy link
Collaborator

bors commented Oct 23, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 23, 2019
@alexcrichton
Copy link
Member

@bors: retry

@bors bors 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 Oct 24, 2019
@bors
Copy link
Collaborator

bors commented Oct 24, 2019

⌛ Testing commit 78b1400 with merge 79e4d13...

bors added a commit that referenced this pull request Oct 24, 2019
Show better error message for Windows abnormal termination.

This helps display better error messages when there is an abnormal termination on Windows.

If rustc crashes, there was a slight mistake in #6270, where the error code was actually negative, so the message was getting hidden behind the `--verbose` flag.  This changes it show that the abnormal error is always shown if rustc crashes in an unusual way.

This also changes `cargo test` to display a better message if the test crashes.  Previously:

```
running 1 test
error: test failed, to rerun pass '--bin crash'
```

New:

```
running 1 test
error: test failed, to rerun pass '--bin crash'

Caused by:
  process didn't exit successfully: `D:\Temp\crash\target\debug\deps\crash-b3c2389529da3d3e.exe` (exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)
```

I didn't add any tests because testing on this on Windows seems a little precarious.  AFAIK, the exact error message depends on the processor (like x86 vs i686), and Windows version.  I was concerned about chasing down every little nuance, though I'm willing to try if it seems important.

Fixes rust-lang/rust#65692 (I think).
@bors
Copy link
Collaborator

bors commented Oct 24, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 24, 2019
@alexcrichton
Copy link
Member

@bors: retry

maybe today?

@bors bors 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 Oct 24, 2019
@bors
Copy link
Collaborator

bors commented Oct 24, 2019

⌛ Testing commit 78b1400 with merge d5f87f113315383b9e053e39bfe92254d2f95218...

@bors
Copy link
Collaborator

bors commented Oct 24, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 24, 2019
@alexcrichton
Copy link
Member

@bors: retry

@bors bors 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 Oct 24, 2019
@bors
Copy link
Collaborator

bors commented Oct 24, 2019

⌛ Testing commit 78b1400 with merge 79bb06b...

bors added a commit that referenced this pull request Oct 24, 2019
Show better error message for Windows abnormal termination.

This helps display better error messages when there is an abnormal termination on Windows.

If rustc crashes, there was a slight mistake in #6270, where the error code was actually negative, so the message was getting hidden behind the `--verbose` flag.  This changes it show that the abnormal error is always shown if rustc crashes in an unusual way.

This also changes `cargo test` to display a better message if the test crashes.  Previously:

```
running 1 test
error: test failed, to rerun pass '--bin crash'
```

New:

```
running 1 test
error: test failed, to rerun pass '--bin crash'

Caused by:
  process didn't exit successfully: `D:\Temp\crash\target\debug\deps\crash-b3c2389529da3d3e.exe` (exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)
```

I didn't add any tests because testing on this on Windows seems a little precarious.  AFAIK, the exact error message depends on the processor (like x86 vs i686), and Windows version.  I was concerned about chasing down every little nuance, though I'm willing to try if it seems important.

Fixes rust-lang/rust#65692 (I think).
@bors
Copy link
Collaborator

bors commented Oct 24, 2019

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 79bb06b to master...

@bors bors merged commit 78b1400 into rust-lang:master Oct 24, 2019
bors added a commit to rust-lang/rust that referenced this pull request Oct 30, 2019
Update cargo, books.

## cargo

8 commits in 3ba5f27170db10af7a92f2b682e049397197b8fa..5da4b4d47963868d9878480197581ccbbdaece74
2019-10-22 15:05:18 +0000 to 2019-10-28 21:53:41 +0000
- Add --filter-platform to `cargo metadata`. (rust-lang/cargo#7376)
- Fix `cargo fix` not showing colors. (rust-lang/cargo#7550)
- Rephrase --manifest-path section (rust-lang/cargo#7409)
- Add a note to discourage the use of -Zminimal-versions. (rust-lang/cargo#7549)
- Fix profile override warning in a workspace. (rust-lang/cargo#7536)
- Fix some tests failing on Windows nightly. (rust-lang/cargo#7534)
- Show better error message for Windows abnormal termination. (rust-lang/cargo#7535)
- Run `apt update` before `apt install` (rust-lang/cargo#7541)

## reference

8 commits in 5b9d2fc..4b21b64
2019-10-03 22:39:10 +0200 to 2019-10-27 22:33:11 +0100
- Document `const_constructor` feature (rust-lang/reference#677)
- Add `non_exhaustive` to reference. (rust-lang/reference#609)
- Re-add rust-docs component for lintcheck (rust-lang/reference#702)
- group signed and unsigned integers in layout table (rust-lang/reference#700)
- Fix layout table rendering (rust-lang/reference#699)
- Add reference for attributes in function parameters (rust-lang/reference#657)
- Update now that proc macros can expand to macro_rules. (rust-lang/reference#694)
- Fix match in union example. (rust-lang/reference#684)

## book

8 commits in 9bb8b161963fcebc9d9ccd732ba26f42108016d5..28fa3d15b0bc67ea5e79eeff2198e4277fc61baf
2019-10-14 18:42:55 -0500 to 2019-10-29 07:16:09 -0500
- Update Ch19.1 on slice splitting (rust-lang/book#1999)
- fixed inconsistent terminology regarding enums (rust-lang/book#2022)
- Update ch15-03 code to match output. (rust-lang/book#2020)
- Fixes rust-lang/book#2039 (rust-lang/book#2040)
- Update ch15-03-drop.md (rust-lang/book#2049)
- unit type value is also a value (rust-lang/book#2061)
- Minor: remove an extraneous `.` (rust-lang/book#2059)
- Clarifications and consistent use of quotation marks (rust-lang/book#1992)

## rust-by-example

4 commits in 0b111eaae36cc4b4997684be853882a59e2c7ca7..f3197ddf2abab9abdbc029def8164f4a748b0d91
2019-10-14 18:34:25 -0300 to 2019-10-29 10:17:40 -0300
- Fix typos (rust-lang/rust-by-example#1285)
- Improve Cargo / Dependencies section (rust-lang/rust-by-example#1287)
- Improve Cargo / Build Scripts section (rust-lang/rust-by-example#1288)
- Make if_let exercise runnable (rust-lang/rust-by-example#1289)
@ehuss ehuss added this to the 1.40.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: 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.

STATUS_HEAP_CORRUPTION crashes are hidden by the test harness
5 participants