Nick Coghlan added the comment:

A bit more detail on the patch-as-merged: it has all of Yury's new tests, but 
the actual bug turned out to just be a missing INCREF/DECREF pair in 

In the success case the reference counting errors cancelled each other out 
without causing a problem, as there was always a second live reference to the 
exception object on the stack.

However, in the case where the awaitable threw an exception the standard 
exception handling machinery took care of removing the saved exception from the 
stack, and correctly decremented the reference count, which then caused 
problems due to the missing INCREF in WITH_CLEANUP_START.


Python tracker <>
Python-bugs-list mailing list

Reply via email to