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 ncoghlan
Recipients NeilGirdhar, Rosuav, Yury.Selivanov, belopolsky, berker.peksag, ethan.furman, gvanrossum, ncoghlan, python-dev, r.david.murray, rhettinger, schlamar, scoder, serhiy.storchaka, vstinner, yselivanov
Date 2015-05-10.03:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Since it took me a moment to figure out why the extra incref was needed:

* both PyException_SetCause and PyException_SetContext steal a reference to their second argument
* hence we need the second incref, rather than relying solely on the reference received from PyErr_NormalizeException

This does suggest the new incref is conceptually in the wrong spot - it should be before the call to PyException_SetCause, such that this block of code *always* possesses a valid reference while accessing "val". At the moment, we technically still don't have an active reference when passing "val" to PyException_SetContext.
Date User Action Args
2015-05-10 03:40:47ncoghlansetrecipients: + ncoghlan, gvanrossum, rhettinger, belopolsky, scoder, vstinner, r.david.murray, ethan.furman, Yury.Selivanov, python-dev, schlamar, Rosuav, berker.peksag, serhiy.storchaka, yselivanov, NeilGirdhar
2015-05-10 03:40:46ncoghlansetmessageid: <>
2015-05-10 03:40:46ncoghlanlinkissue22906 messages
2015-05-10 03:40:46ncoghlancreate