mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-10-31 00:06:33 +01:00 
			
		
		
		
	add another test for invalid small region frees
This commit is contained in:
		
							parent
							
								
									fe85116891
								
							
						
					
					
						commit
						bde8c3c29b
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		|  | @ -12,6 +12,7 @@ all: \ | |||
|     invalid_free_protected \
 | ||||
|     invalid_free_unprotected \
 | ||||
|     invalid_free_small_region \
 | ||||
|     invalid_free_small_region_far \
 | ||||
|     uninitialized_free \
 | ||||
|     uninitialized_realloc \
 | ||||
|     uninitialized_malloc_usable_size \
 | ||||
|  |  | |||
|  | @ -0,0 +1,12 @@ | |||
| #include <stdlib.h> | ||||
| 
 | ||||
| __attribute__((optimize(0))) | ||||
| int main(void) { | ||||
|     char *p = malloc(16); | ||||
|     if (!p) { | ||||
|         return 1; | ||||
|     } | ||||
|     char *q = p + 1024 * 1024 * 1024; | ||||
|     free(q); | ||||
|     return 0; | ||||
| } | ||||
		Loading…
	
	Add table
		
		Reference in a new issue