-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-115124: Use _PyObject_ASSERT() in gc.c #115125
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
!buildbot Windows11 Bigmem |
AMD64 Windows11 Bigmem PR job: https://buildbot.python.org/all/#/builders/1088/builds/308 |
2b625c7
to
3f8a768
Compare
@pablogsal: I rebased my PR. Would you mind to review the change? |
@colesbury @nascheme: Would you mind to review this change? |
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.
There's a compiler warning, but otherwise LGTM
Python/gc.c
Outdated
next isn't, so they can't | ||
be the same */ | ||
// wrasgc is reachable, but next isn't, so they can't be the same | ||
_PyObject_ASSERT(wr, wrasgc != next); |
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.
There's a GitHub actions warning: I think this needs a (PyObject *)
cast on wr
.
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.
Alright, I missed that warning. It's now fixed.
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 modulo the compiler warning
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
@colesbury @pablogsal: Thanks for reviews. I rebased my PR on main, fixed the compiler warning, and enabled "auto-merge". |
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.