mirror of
https://github.com/python/cpython.git
synced 2026-05-09 06:01:08 -04:00
4ec5d5699d
The new profiler event stream includes a "return" event even when an exception is being propogated, but the machinery that called the profile hook did not save & restore the exception. In debug mode, the exception was detected during the execution of the profile callback, which did not have the proper internal flags set for the exception. Saving & restoring the exception state solves the problem.