mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-11-03 01:06:33 +01:00 
			
		
		
		
	Make the testsuite work for read-after-free
This commit makes the testsuite fail if the read-after-free tests are failing, instead of simply printing some info.
This commit is contained in:
		
							parent
							
								
									9142a9376b
								
							
						
					
					
						commit
						7fce9cdc28
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -13,6 +13,9 @@ OPTNONE int main(void) {
 | 
			
		|||
    free(p);
 | 
			
		||||
    for (size_t i = 0; i < 128 * 1024; i++) {
 | 
			
		||||
        printf("%x\n", p[i]);
 | 
			
		||||
        if (p[i] != '\0') {
 | 
			
		||||
            return 1;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,6 +13,9 @@ OPTNONE int main(void) {
 | 
			
		|||
    free(p);
 | 
			
		||||
    for (size_t i = 0; i < 16; i++) {
 | 
			
		||||
        printf("%x\n", p[i]);
 | 
			
		||||
        if (p[i] != '\0') {
 | 
			
		||||
            return 1;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue