Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Feb 7, 2024

Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.

@vstinner
Copy link
MemberAuthor

!buildbot Windows11 Bigmem

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 468de57 🤖

The command will test the builders whose names match following regular expression: Windows11 Bigmem

The builders matched are:

  • AMD64 Windows11 Bigmem PR

@vstinner
Copy link
MemberAuthor

@vstinner
Copy link
MemberAuthor

AMD64 Windows11 Bigmem PR job: https://buildbot.python.org/all/#/builders/1088/builds/308

@vstinnervstinnerforce-pushed the gc_assert branch 2 times, most recently from 2b625c7 to 3f8a768CompareFebruary 12, 2024 15:56
@vstinner
Copy link
MemberAuthor

@pablogsal: I rebased my PR. Would you mind to review the change?

@vstinner
Copy link
MemberAuthor

@colesbury@nascheme: Would you mind to review this change?

Copy link
Contributor

@colesburycolesbury left a 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);
Copy link
Contributor

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.

Copy link
MemberAuthor

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.

Copy link
Member

@pablogsalpablogsal left a 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.
@vstinner
Copy link
MemberAuthor

@colesbury@pablogsal: Thanks for reviews. I rebased my PR on main, fixed the compiler warning, and enabled "auto-merge".

@vstinnervstinner merged commit 94f1334 into python:mainFeb 15, 2024
@vstinnervstinner deleted the gc_assert branch February 15, 2024 14:29
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Replace assert() with _PyObject_ASSERT() in gc.c to dump the object when an assertion fails.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vstinner@bedevere-bot@colesbury@pablogsal