Ticket #36 (new defect)

Opened 5 years ago

Last modified 5 years ago

False positive with PyTuple_SetItem() where index can't be out of range

Reported by: dmalcolm Owned by: dmalcolm@…
Priority: major Milestone:
Component: CPython static analysis Version:
Keywords: Cc:
Blocked By: Blocking:


See e.g.: http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-03-05/pygoocanvas-0.14.1-6.fc17/pygoocanvas-0.14.1/.libs/goocanvas.c._wrap_goo_canvas_item_model_get_child_properties-refcount-errors.html#report-0

The checker considered that the possibility of PyTuple_SetItem() failing due to index out of range (and thus not stealing the reference, leading to a leak), but it's provable that the index is within range (and is of the correct type), thus the call can't fail.

Change History

comment:1 Changed 5 years ago by dmalcolm

  • Component changed from Core plugin code to CPython static analysis
Note: See TracTickets for help on using tickets.