mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-118074: Immortal executors are not GC-able (#118182)
Better version of gh-118117. Just check for immortality instead of an address range check.
This commit is contained in:
		
							parent
							
								
									258408239a
								
							
						
					
					
						commit
						7e87d30f1f
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		|  | @ -397,10 +397,7 @@ executor_traverse(PyObject *o, visitproc visit, void *arg) | |||
| static int | ||||
| executor_is_gc(PyObject *o) | ||||
| { | ||||
|     if ((PyObject *)&COLD_EXITS[0] <= o && o < (PyObject *)&COLD_EXITS[COLD_EXIT_COUNT]) { | ||||
|         return 0; | ||||
|     } | ||||
|     return 1; | ||||
|     return !_Py_IsImmortal(o); | ||||
| } | ||||
| 
 | ||||
| PyTypeObject _PyUOpExecutor_Type = { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum