[Python-Dev] Big trouble in CVS Python (original) (raw)
Tim Peters tim_one@email.msn.com
Sun, 13 Apr 2003 17:44:57 -0400
- Previous message: [Python-Dev] Big trouble in CVS Python
- Next message: [Python-Dev] Big trouble in CVS Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Notice, however, that the float object is not directly deallocated. Instead, it is deallocated as a consequence of deallocating a one-element tuple which is the argument tuple for "round", in
PyObject *callargs; callargs = loadargs(ppstack, na); x = PyCFunctionCall(func, callargs, NULL); PyXDECREF(callargs); loadargs copies the argument from the stack into the tuple, transferring the refence. So apparently, the float const gets on the stack without its reference being bumped...
That was my excited guess, until I looked at LOAD_CONST . Calls are such an elaborate dance that the refcount on this puppy gets as high as 7. The problem actually occurred when the refcount was at its peak, due to an erroneous decref in handle_range_longs(). At that point the refcount fell to 6, and the remaining 6(!) decrefs all looked correct.
That's as far as I can get tonight.
Thanks for sharing the pain!
- Previous message: [Python-Dev] Big trouble in CVS Python
- Next message: [Python-Dev] Big trouble in CVS Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]