Author scoder
Recipients scoder
Date 2015-04-18.19:45:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429386313.82.0.910239252026.issue23996@psf.upfronthosting.co.za>
In-reply-to
Content
The yield-from implementation calls _PyGen_FetchStopIterationValue() to get the exception value. If the StopIteration exception is not normalised, e.g. because it was set by PyErr_SetObject() in a C extension, then _PyGen_FetchStopIterationValue() will cast to (PyStopIterationObject*) whatever the exception value is and happily interpret an arbitrary memory position as PyObject*.

I attached a possible patch for the function. Another place to fix it would be in the yield-from code in ceval.c, but directly genobject.c seems the safer place.
History
Date User Action Args
2015-04-18 19:45:13scodersetrecipients: + scoder
2015-04-18 19:45:13scodersetmessageid: <1429386313.82.0.910239252026.issue23996@psf.upfronthosting.co.za>
2015-04-18 19:45:13scoderlinkissue23996 messages
2015-04-18 19:45:13scodercreate