Skip to content

Exit with code 101 on fatal codegen errors #55023

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

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Oct 12, 2018

Fixes #54992.

This PR installs a custom fatal error handler that prints the error from LLVM and exits with 101. There should be no visible change in the output from LLVM. This allows distinguishing a fatal LLVM error with a compilation error by exit code.

This PR also modifies the LLVM codegen backend to ICE instead of emitting a fatal error when encountering a LLVM worker thread panic for the same reason.

r? @cuviper

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

cuviper commented Oct 15, 2018

LGTM, but I don't have bors privileges.

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r=cuviper

@bors
Copy link
Collaborator

bors commented Oct 15, 2018

📌 Commit 1811f13 has been approved by cuviper

@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 15, 2018
@bors
Copy link
Collaborator

bors commented Oct 16, 2018

⌛ Testing commit 1811f13 with merge df0d6ad...

bors added a commit that referenced this pull request Oct 16, 2018
Exit with code 101 on fatal codegen errors

Fixes #54992.

This PR installs a custom fatal error handler that prints the error from LLVM and exits with 101. There should be no visible change in the output from LLVM. This allows distinguishing a fatal LLVM error with a compilation error by exit code.

This PR also modifies the LLVM codegen backend to ICE instead of emitting a fatal error when encountering a LLVM worker thread panic for the same reason.

r? @cuviper
@bors
Copy link
Collaborator

bors commented Oct 16, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: cuviper
Pushing df0d6ad to master...

@bors bors merged commit 1811f13 into rust-lang:master Oct 16, 2018
@euclio euclio deleted the llvm-error-handler branch October 16, 2018 13:26
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.

5 participants