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

bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() #18278

Merged
merged 1 commit into from Jan 30, 2020

Conversation

@vstinner
Copy link
Member

vstinner commented Jan 30, 2020

@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 30, 2020

About clang "code will never be executed [-Wunreachable-code]" warning: I compiled Python using clang -O3. There is one warning, but it's unrelated to this change:

./Modules/timemodule.c:113:13: warning: code will never be executed [-Wunreachable-code]

I tested clang version 9.0.0 (Fedora 9.0.0-1.fc31).

@vstinner vstinner force-pushed the vstinner:noreturn branch from fda3f27 to 4102725 Jan 30, 2020
Add _Py_NO_RETURN to functions calling Py_FatalError():

* _PyObject_AssertFailed()
* dummy_dealloc()
* faulthandler_fatal_error_thread()
* none_dealloc()
* notimplemented_dealloc()
@vstinner vstinner force-pushed the vstinner:noreturn branch from 4102725 to 1eeea46 Jan 30, 2020
@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 30, 2020

Note: marking _PyObject_AssertFailed() with _Py_NO_RETURN idea comes from a GCC 10 regression bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93384#c17

@vstinner vstinner merged commit 2a4903f into python:master Jan 30, 2020
8 checks passed
8 checks passed
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200130.42 succeeded
Details
bedevere/issue-number Issue number 38631 found
Details
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vstinner vstinner deleted the vstinner:noreturn branch Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.