Author: Armin Rigo <[email protected]>
Branch:
Changeset: r46043:e02ef353c3c8
Date: 2011-07-28 10:22 +0200
http://bitbucket.org/pypy/pypy/changeset/e02ef353c3c8/
Log: The recent rewrite of crash_in_jit() lost the original traceback in
non-translated versions.
diff --git a/pypy/jit/metainterp/warmspot.py b/pypy/jit/metainterp/warmspot.py
--- a/pypy/jit/metainterp/warmspot.py
+++ b/pypy/jit/metainterp/warmspot.py
@@ -409,6 +409,7 @@
jd.warmstate = state
def crash_in_jit(e):
+ tb = not we_are_translated() and sys.exc_info()[2]
try:
raise e
except JitException:
@@ -422,8 +423,8 @@
print "~~~ Crash in JIT!"
print '~~~ %s: %s' % (e.__class__, e)
if sys.stdout == sys.__stdout__:
- import pdb; pdb.post_mortem(sys.exc_info()[2])
- raise
+ import pdb; pdb.post_mortem(tb)
+ raise e.__class__, e, tb
fatalerror('~~~ Crash in JIT! %s' % (e,), traceback=True)
crash_in_jit._dont_inline_ = True
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit