cpython/Python
Amaury Forgeot d'Arc c572dc3752 Backport for issue1265 (pdb bug with "with" statement).
When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set.  This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.

It is necessary to save/restore the exception around the call to the trace
function.

This happens a lot with py3k: isinstance() of an ABCMeta instance runs
    def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        return any(cls.__subclasscheck__(c)
                   for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.

And the problem can be reproduced in 2.5 with pure python code.
2007-11-13 22:43:05 +00:00
..
asdl.c Fix type errors. 2006-04-13 13:08:58 +00:00
ast.c Backport 58330: 2007-10-05 03:45:42 +00:00
atof.c
bltinmodule.c Fix SF #1552093, eval docstring typo (3 ps in mapping) 2006-09-05 01:52:00 +00:00
ceval.c Backport for issue1265 (pdb bug with "with" statement). 2007-11-13 22:43:05 +00:00
codecs.c Bug #1511381: codec_getstreamcodec() in codec.c is corrected to 2006-06-23 21:16:18 +00:00
compile.c Fix #1169: remove docstrings in functions for -OO. 2007-09-19 06:37:26 +00:00
dup2.c
dynload_aix.c Fix SF bug #1072182, problems with signed characters. 2005-12-19 06:05:18 +00:00
dynload_atheos.c
dynload_beos.c
dynload_dl.c
dynload_hpux.c Oops, I forgot to include this file in the last commit (46046): 2006-05-19 07:05:01 +00:00
dynload_next.c
dynload_os2.c
dynload_shlib.c Fix a warning from gcc by adding a missed const qualifier. 2006-01-04 01:30:17 +00:00
dynload_stub.c
dynload_win.c Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System. 2007-04-21 12:46:49 +00:00
errors.c Fix SF bug #1669182. Handle string exceptions even if unraisable (ie in __del__). 2007-02-26 23:46:51 +00:00
fmod.c
frozen.c
frozenmain.c
future.c Handle more mem alloc issues found with failmalloc 2006-07-23 07:50:36 +00:00
getargs.c Forward-port of r52136: a review of overflow-detecting code. 2006-10-04 11:44:06 +00:00
getcompiler.c
getcopyright.c update to (c) years to include 2007 2007-01-06 04:50:44 +00:00
getcwd.c Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses 2006-04-25 15:29:46 +00:00
getmtime.c spread the extern "C" { } magic pixie dust around. Python itself builds now 2006-04-13 02:06:09 +00:00
getopt.c Accept long options "--help" and "--version". 2006-07-12 15:31:17 +00:00
getplatform.c
getversion.c
graminit.c Update graminit.c for the fix for #1488915, Multiple dots in relative import 2006-05-25 11:26:25 +00:00
hypot.c
import.c Backport fix of #1752175. 2007-08-23 18:08:33 +00:00
importdl.c
importdl.h
mactoolboxglue.c Add missing Py_DECREFs. 2006-07-11 16:44:25 +00:00
marshal.c Backport 58424: 2007-10-12 03:59:09 +00:00
memmove.c
modsupport.c Forward-port of r52136: a review of overflow-detecting code. 2006-10-04 11:44:06 +00:00
mysnprintf.c
mystrtoul.c Forward-port of r52136: a review of overflow-detecting code. 2006-10-04 11:44:06 +00:00
pyarena.c Fix more memory allocation issues found with failmalloc. 2006-07-22 16:20:49 +00:00
pyfpe.c
pystate.c Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167. 2007-03-12 16:49:23 +00:00
pystrtod.c Bug #1417699: Reject locale-specific decimal point in float() 2006-07-03 12:19:50 +00:00
Python-ast.c Introduce asdl_int_seq, to hold cmpop_ty. 2006-04-13 12:29:43 +00:00
pythonrun.c Undefine the Yield macro after including Python_ast.h where it may cause conflicts with winbase.h on Windows. 2007-05-02 16:02:48 +00:00
sigcheck.c
strdup.c
strerror.c
strtod.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
structmember.c Patch #1733960: Allow T_LONGLONG to accept ints. 2007-06-09 08:01:33 +00:00
symtable.c Klocwork made another run and found a bunch more problems. 2006-08-12 01:43:40 +00:00
sysmodule.c SF #1701207: svnversion_init assertion failed 2007-04-16 06:12:02 +00:00
thread.c Handle more memory allocation failures without crashing. 2006-07-21 07:59:47 +00:00
thread_atheos.h
thread_beos.h
thread_cthread.h
thread_foobar.h
thread_lwp.h
thread_nt.h Fix NonRecursiveMutex on x64. The signature of the faux-InterlockedCompareExchange function was wrong: It works with LONG and not PVOID objects, and it needs to have the target marked as volatile. Further, it is not needed at all for x64 targets, since that platform always has the real McCoy. 2007-05-07 18:28:12 +00:00
thread_os2.h bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; 2006-07-23 13:00:04 +00:00
thread_pth.h
thread_pthread.h Patch #1454481: Make thread stack size runtime tunable. 2006-06-13 15:04:24 +00:00
thread_sgi.h
thread_solaris.h
thread_wince.h
traceback.c Make PyTraceBack_Here use the current thread, not the 2007-01-23 21:11:58 +00:00