Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fcce462e
Commit
fcce462e
authored
May 04, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
pointer.
parents
ad039f75
7822f151
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
Misc/NEWS
Misc/NEWS
+3
-0
Objects/descrobject.c
Objects/descrobject.c
+15
-15
No files found.
Misc/NEWS
View file @
fcce462e
...
...
@@ -10,6 +10,9 @@ Release date: tba
Core and Builtins
-----------------
- Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
pointer.
- Issue #20120: Use RawConfigParser for .pypirc parsing,
removing support for interpolation unintentionally added
with move to Python 3. Behavior no longer does any
...
...
Objects/descrobject.c
View file @
fcce462e
...
...
@@ -1386,27 +1386,27 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
return
NULL
;
}
args
=
cached_args
;
if
(
!
args
||
Py_REFCNT
(
args
)
!=
1
)
{
Py_CLEAR
(
cached_args
);
if
(
!
(
cached_args
=
args
=
PyTuple_New
(
1
)))
cached_args
=
NULL
;
if
(
!
args
)
{
args
=
PyTuple_New
(
1
);
if
(
!
args
)
return
NULL
;
_PyObject_GC_UNTRACK
(
args
);
}
Py_INCREF
(
args
);
assert
(
Py_REFCNT
(
args
)
==
2
);
Py_INCREF
(
obj
);
PyTuple_SET_ITEM
(
args
,
0
,
obj
);
ret
=
PyObject_Call
(
gs
->
prop_get
,
args
,
NULL
);
if
(
args
==
cached_args
)
{
if
(
Py_REFCNT
(
args
)
==
2
)
{
obj
=
PyTuple_GET_ITEM
(
args
,
0
);
PyTuple_SET_ITEM
(
args
,
0
,
NULL
)
;
Py_X
DECREF
(
obj
);
if
(
cached_args
==
NULL
&&
Py_REFCNT
(
args
)
==
1
)
{
assert
(
Py_SIZE
(
args
)
==
1
);
assert
(
PyTuple_GET_ITEM
(
args
,
0
)
==
obj
);
cached_args
=
args
;
Py_
DECREF
(
obj
);
}
else
{
Py_CLEAR
(
cached_args
);
}
}
assert
(
Py_REFCNT
(
args
)
>=
1
);
_PyObject_GC_TRACK
(
args
);
Py_DECREF
(
args
);
}
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment