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 scoder
Recipients scoder
Date 2015-04-18.19:45:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2015-04-18 19:45:13scodersetrecipients: + scoder
2015-04-18 19:45:13scodersetmessageid: <>
2015-04-18 19:45:13scoderlinkissue23996 messages
2015-04-18 19:45:13scodercreate