-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-142038: Expand guard for types_world_is_stopped to fix debug builds without assertions #142039
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
Conversation
… builds without assertions
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Objects/typeobject.c
Outdated
| #define END_TYPE_DICT_LOCK() Py_END_CRITICAL_SECTION2() | ||
|
|
||
| #ifndef NDEBUG | ||
| #if !defined(NDEBUG) || defined(Py_Debug) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the macro is not Py_Debug but Py_DEBUG And ideally, I think we should instead use Py_DEBUG rather than NDEBUG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this should be just Py_DEBUG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had that before, and that caused problems for non-debug builds with --with-assertions. This issue was then addressed by #140133, which, however, introduced a new problem with debug-without-assertions builds.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Can someone else reproduce #142038 issue? |
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
…ug builds without assertions (python#142039)
The
types_world_is_stopped()function needs to be defined ifNDEBUGor when we're in a debug build is not defined.Issue:
CFLAGS=-DNDEBUGand--with-pydebug#142038CFLAGS=-DNDEBUGand--with-pydebug#142038