mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	GH-91079: Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now (GH130413)
Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now
Unfortunatlely, the change broke some buildbots.
This reverts commit 2498c22fa0.
			
			
This commit is contained in:
		
							parent
							
								
									0ff1611574
								
							
						
					
					
						commit
						ef29104f7d
					
				
					 47 changed files with 1466 additions and 1220 deletions
				
			
		|  | @ -21,18 +21,14 @@ PyAPI_FUNC(void) PyErr_DisplayException(PyObject *); | |||
| /* Stuff with no proper home (yet) */ | ||||
| PyAPI_DATA(int) (*PyOS_InputHook)(void); | ||||
| 
 | ||||
| /* Stack size, in "pointers". This must be large enough, so
 | ||||
|  * no two calls to check recursion depth are more than this far | ||||
|  * apart. In practice, that means it must be larger than the C | ||||
|  * stack consumption of PyEval_EvalDefault */ | ||||
| #if defined(Py_DEBUG) && defined(WIN32) | ||||
| #  define PYOS_STACK_MARGIN 3072 | ||||
| #else | ||||
| #  define PYOS_STACK_MARGIN 2048 | ||||
| #endif | ||||
| #define PYOS_STACK_MARGIN_BYTES (PYOS_STACK_MARGIN * sizeof(void *)) | ||||
| /* Stack size, in "pointers" (so we get extra safety margins
 | ||||
|    on 64-bit platforms).  On a 32-bit platform, this translates | ||||
|    to an 8k margin. */ | ||||
| #define PYOS_STACK_MARGIN 2048 | ||||
| 
 | ||||
| #if defined(WIN32) | ||||
| #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 | ||||
| /* Enable stack checking under Microsoft C */ | ||||
| // When changing the platforms, ensure PyOS_CheckStack() docs are still correct
 | ||||
| #define USE_STACKCHECK | ||||
| #endif | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Petr Viktorin
						Petr Viktorin