mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #14432: Remove the thread state field from the frame structure. Fix a
crash when a generator is created in a C thread that is destroyed while the generator is still used. The issue was that a generator contains a frame, and the frame kept a reference to the Python state of the destroyed C thread. The crash occurs when a trace function is setup.
This commit is contained in:
		
							parent
							
								
									62ca10051b
								
							
						
					
					
						commit
						fdeb6ec45a
					
				
					 8 changed files with 179 additions and 45 deletions
				
			
		|  | @ -726,7 +726,6 @@ PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals, | |||
|         Py_INCREF(locals); | ||||
|         f->f_locals = locals; | ||||
|     } | ||||
|     f->f_tstate = tstate; | ||||
| 
 | ||||
|     f->f_lasti = -1; | ||||
|     f->f_lineno = code->co_firstlineno; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner