[Python-checkins] r50742 - python/trunk/Objects/frameobject.c
neal.norwitz
python-checkins at python.org
Fri Jul 21 07:31:02 CEST 2006
Author: neal.norwitz
Date: Fri Jul 21 07:31:02 2006
New Revision: 50742
Modified:
python/trunk/Objects/frameobject.c
Log:
Move the initialization of some pointers earlier. The problem is
that if we call Py_DECREF(frame) like we do if allocating locals fails,
frame_dealloc() will try to use these bogus values and crash.
Modified: python/trunk/Objects/frameobject.c
==============================================================================
--- python/trunk/Objects/frameobject.c (original)
+++ python/trunk/Objects/frameobject.c Fri Jul 21 07:31:02 2006
@@ -642,6 +642,7 @@
f->f_trace = NULL;
f->f_exc_type = f->f_exc_value = f->f_exc_traceback = NULL;
}
+ f->f_stacktop = f->f_valuestack;
f->f_builtins = builtins;
Py_XINCREF(back);
f->f_back = back;
@@ -672,7 +673,6 @@
f->f_lineno = code->co_firstlineno;
f->f_iblock = 0;
- f->f_stacktop = f->f_valuestack;
_PyObject_GC_TRACK(f);
return f;
}
More information about the Python-checkins
mailing list