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

Call abort() instead of std::exit() on unhandled exception #39108

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Mar 29, 2020

Summary

SUMMARY: None

Purpose of change

When an exception is thrown but unhandled, the program's state might not allow for correct execution of the normal exiting procedures (such as deconstructing static variables). If a new signal is raised during the exit procedure, it may overwrite the crash log with useless data (or fry the crash handling code outright).

Describe the solution

Use abort instead of std::exit.

Testing

Tested by throwing an exception from the game and it was correctly handled.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Mar 29, 2020
@ZhilkinSerg ZhilkinSerg merged commit e2e8023 into CleverRaven:master Mar 29, 2020
@Qrox Qrox deleted the abort-on-exception branch March 30, 2020 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants