Skip to content

gh-101855: Added additional checker Py_INCREF macro in object.h - #101856

Closed
sigdevel wants to merge 1 commit into
python:mainfrom
sigdevel:main
Closed

gh-101855: Added additional checker Py_INCREF macro in object.h#101856
sigdevel wants to merge 1 commit into
python:mainfrom
sigdevel:main

Conversation

@sigdevel

@sigdevelsigdevel commented Feb 12, 2023

Copy link
Copy Markdown

An attempt to fix#101855
Added additional checker Py_INCREF macro

fixed SIG11 called synt example (<Python-3.11.1><core.3615176><#0 Py_INCREF (op=0x0) at ./Include/object.h:502>)
@ghost

ghost commented Feb 12, 2023

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@sigdevelsigdevel changed the title Update object.hgh-101855: Added additional checker Py_INCREF macro in object.hFeb 12, 2023
@corona10

Copy link
Copy Markdown
Member

Py_XINCREF already did for the thing, I don't think that this fix is the correct approach.

cpython/Include/object.h

Lines 640 to 646 in 6ef6915

/* Function to use in case the object pointer can be NULL: */
staticinlinevoidPy_XINCREF(PyObject*op)
{
if (op!=_Py_NULL) {
Py_INCREF(op);
}
}

@corona10corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@kumaraditya303

Copy link
Copy Markdown
Contributor

Closed as this is wrong solution.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gc.get_referrers() can be used to see objects before they are fully built

4 participants

@sigdevel@bedevere-bot@corona10@kumaraditya303