Skip to content

Consider handling signals to catch hard crashes of rustc to provide nice ICE message #16238

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

Closed
huonw opened this issue Aug 4, 2014 · 3 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@huonw
Copy link
Member

huonw commented Aug 4, 2014

E.g. if rustc segfaults or aborts we could (try to) catch the signals to make a best-effort attempt to print an informative ICE message, like gcc:

$ python -c 'print ("int main(){" + "*" * (10**6) + "}")' | gcc -x c -
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

(It's fine if this doesn't work on all platforms, since theoretically no-one will ever see it... ;) )

@steveklabnik
Copy link
Member

Triage: no change.

@apasel422 apasel422 changed the title Consider handling singals to catch hard crashes of rustc to provide nice ICE message Consider handling signals to catch hard crashes of rustc to provide nice ICE message May 26, 2016
@steveklabnik steveklabnik added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2017
@pnkfelix
Copy link
Member

I don't know if a change along these lines would be a net benefit. At the very least, I'd want to double-check that installing such a signal handler does not cause a degradation of the experience trying to debug the cause of the sigsegv under gdb/lldb.

triage: P-low.

Nominating for discussion at T-compiler meeting, with intent to close.

@pnkfelix pnkfelix added P-low Low priority I-nominated labels Feb 27, 2020
@spastorino
Copy link
Member

After talking with @pnkfelix during triage about this. We're inclined to close this issue due to being uncertain if having this issue open is any better. Maybe this feature needs a design meeting.

Closing but please feel free to reopen if you disagree with us :).

bors added a commit to rust-lang-ci/rust that referenced this issue Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants