mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Handle allocation failures gracefully. Found with failmalloc.
Many (all?) of these could be backported.
This commit is contained in:
		
							parent
							
								
									1adbb50701
								
							
						
					
					
						commit
						e1fdb32ff2
					
				
					 6 changed files with 52 additions and 41 deletions
				
			
		|  | @ -7918,6 +7918,9 @@ void _PyUnicode_Init(void) | |||
|     unicode_freelist = NULL; | ||||
|     unicode_freelist_size = 0; | ||||
|     unicode_empty = _PyUnicode_New(0); | ||||
|     if (!unicode_empty) | ||||
| 	return; | ||||
| 
 | ||||
|     strcpy(unicode_default_encoding, "ascii"); | ||||
|     for (i = 0; i < 256; i++) | ||||
| 	unicode_latin1[i] = NULL; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz