-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-134768: Fix definition of mt_continue_should_break()
#134769
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
Just verifying my understanding, because "NDEBUG" is rather confusingly named it seems: the failure case is you compile in debug (not |
No. The failure is that you compile regular (which doesn't set |
Other way around:
It's really stupid and it's to do with how |
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.
Okay, makes sense, thanks for the explanations
Could we merge this, please? It just bit me again as I was about to recheck a failing assertion on |
Thanks @thesamesam for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…onGH-134769) In 121ed71, mt_continue_should_break was changed to be guarded by `Py_DEBUG`, but it's used in `compress_mt_continue_lock_held` with just `assert`, so it needs to be available when `NDEBUG` is undefined too. `Py_DEBUG` implies `NDEBUG` is undefined, so we can check just that. (cherry picked from commit 2f2bee2) Co-authored-by: Sam James <[email protected]> Fixes: 121ed71
GH-134916 is a backport of this pull request to the 3.14 branch. |
…134769) (#134916) gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769) In 121ed71, mt_continue_should_break was changed to be guarded by `Py_DEBUG`, but it's used in `compress_mt_continue_lock_held` with just `assert`, so it needs to be available when `NDEBUG` is undefined too. `Py_DEBUG` implies `NDEBUG` is undefined, so we can check just that. (cherry picked from commit 2f2bee2) Fixes: 121ed71 Co-authored-by: Sam James <[email protected]>
In 121ed71, mt_continue_should_break was changed to be guarded by
Py_DEBUG
, but it's used incompress_mt_continue_lock_held
with justassert
, so it needs to be available whenNDEBUG
is undefined too.Py_DEBUG
impliesNDEBUG
is undefined, so we can check just that.Fixes: 121ed71