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.

Author santoso.wijaya
Recipients OscarL, pitrou, santoso.wijaya
Date 2011-06-15.22:46:57
SpamBayes Score 0.00103754
Marked as misclassified No
Message-id <1308178018.25.0.203433221469.issue12340@psf.upfronthosting.co.za>
In-reply-to
Content
Regarding the crash,

From what I can see, the `tp_clear` method of bufferedrwpair is called during Py_Finalize() that leads to garbage collection. This NULLs `self->writer` for the rwpair object.

Later, in the same garbage collection routine, the `tp_clear` of textio (the wrapper) is called. This attempts to finalize its wrapped object by first calling the `closed` property of the wrapped object. This property read is propagated down to the wrapped bufferedrwpair, `bufferedrwpair_closed_get()`.

At this point, `self->writer` for the bufferedrwpair object is already NULL from the previous clear. Hence, the crash happens because a NULL pointer dereferencing is attempted.
History
Date User Action Args
2011-06-15 22:46:58santoso.wijayasetrecipients: + santoso.wijaya, pitrou, OscarL
2011-06-15 22:46:58santoso.wijayasetmessageid: <1308178018.25.0.203433221469.issue12340@psf.upfronthosting.co.za>
2011-06-15 22:46:57santoso.wijayalinkissue12340 messages
2011-06-15 22:46:57santoso.wijayacreate