This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Several objects don't decref tmp on failure in subtype_new
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: ccraig, nnorwitz, rhettinger
Priority: normal Keywords: patch

Created on 2003-03-14 15:08 by ccraig, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
changes-subtype ccraig, 2003-03-17 15:18 fixes bug
Messages (4)
msg43042 - (view) Author: Christopher A. Craig (ccraig) Date: 2003-03-14 15:08
Several objects have a something_subtype_new which
creates a new object of a given subtype that if the
subtype creation routine fails for any reason, returns
NULL but leaves a temporary variable with a reference.  

The only normal reason this would occur is if you ran
out of memory (in which case it wouldn't matter), but I
don't think the core can predict that it knows that to
be the only reason an unknown subtype might return NULL
in it's alloc.

msg43043 - (view) Author: Christopher A. Craig (ccraig) Date: 2003-03-17 15:18
Logged In: YES 
user_id=135050

Apparently upload didn't take the first time
msg43044 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-05-22 21:34
Logged In: YES 
user_id=33168

All of these look correct.  Moving to patches.
msg43045 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-06-28 20:07
Logged In: YES 
user_id=80475

Committed (with minor modifications) as:

Objects/floatobject.c 2.124
Objects/intobject.c 2.105
Objects/longobject.c 1.161
Objects/unicodeobject.c 2.189
History
Date User Action Args
2022-04-10 16:07:39adminsetgithub: 38162
2003-03-14 15:08:06ccraigcreate