mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-10-31 00:06:33 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			321 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			321 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <stdlib.h>
 | |
| #include <string.h>
 | |
| 
 | |
| #include <unistd.h>
 | |
| 
 | |
| #include "util.h"
 | |
| 
 | |
| COLD noreturn void fatal_error(const char *s) {
 | |
|     const char *prefix = "fatal allocator error: ";
 | |
|     write(STDERR_FILENO, prefix, strlen(prefix));
 | |
|     write(STDERR_FILENO, s, strlen(s));
 | |
|     write(STDERR_FILENO, "\n", 1);
 | |
|     abort();
 | |
| }
 |