1 #include <string.h> 2 #include <stdlib.h> 3 #include <unistd.h> 4 #include <sys/types.h> 5 #include <sys/stat.h> 6 #include <fcntl.h> 7 #include <sys/time.h> 8 9 int main(void) 10 { 11 int i = 11; int fd = open("/dev/null", O_WRONLY); 12 char* buf = malloc(sizeof(char) * 6); 13 char c = buf[-1]; // LoadStoreErr 14 char* x = buf + (long)buf; // ArithErr 15 char* y = (char*)((long)buf * i); // AsmErr 16 write(fd, buf+3, 5); // SysParamErr 17 close(fd); 18 return x-y+c; 19 } 20