gh-142038: Expand guard for types_world_is_stopped to fix debug builds without assertions#142039
gh-142038: Expand guard for types_world_is_stopped to fix debug builds without assertions#142039vstinner merged 2 commits intopython:mainfrom
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.
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.
Agreed, this should be just Py_DEBUG.
There was a problem hiding this comment.
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? |
|
…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