mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									eb9b39bd57
								
							
						
					
					
						commit
						9a68f8c304
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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__"); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christian Heimes
						Christian Heimes