diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-14 00:16:07 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-14 00:16:07 +0000 |
commit | 3422a92be956969ed16798d0be816f8a8c930999 (patch) | |
tree | 2a82f88ff2910b931808488f7b3f60ecb82f853c /Python/pythonrun.c | |
parent | 4edfae1c6830ed80762cb9b5505846ee4eebe6e2 (diff) | |
download | cpython-3422a92be956969ed16798d0be816f8a8c930999.tar.gz |
Moved the initalization of the exception before the initialization of sys.
On Windows _PySys_Init() could raise an uninitialized exception which leads to a seg fault.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 044c4a90d9..763f9059bb 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -217,6 +217,9 @@ Py_InitializeEx(int install_sigs) Py_FatalError("Py_Initialize: can't initialize builtins dict"); Py_INCREF(interp->builtins); + /* initialize builtin exceptions */ + _PyExc_Init(); + sysmod = _PySys_Init(); if (sysmod == NULL) Py_FatalError("Py_Initialize: can't initialize sys"); @@ -239,9 +242,6 @@ Py_InitializeEx(int install_sigs) _PyImport_Init(); - /* initialize builtin exceptions */ - _PyExc_Init(); - /* phase 2 of builtins */ _PyImport_FixupExtension("__builtin__", "__builtin__"); |