ciabatta/test/test.c

24 lines
423 B
C
Raw Normal View History

2022-06-02 13:08:59 +00:00
#include <assert.h>
#include <ctype.h>
2022-06-06 00:16:44 +00:00
#include <stdio.h>
2022-06-05 22:02:54 +00:00
#include <stdlib.h>
2022-06-06 00:26:32 +00:00
#include <errno.h>
2022-06-07 06:02:23 +00:00
#include <stdbool.h>
2022-06-06 04:57:25 +00:00
#include <inttypes.h>
2022-06-05 22:02:54 +00:00
2022-06-07 06:02:23 +00:00
#include <signal.h>
void my_va_handler(int a) {
printf("NULLPTR deref or something idk not an expert in signals\n");
}
2022-06-06 04:57:25 +00:00
int main(int argc, char** argv) {
2022-06-07 06:02:23 +00:00
signal(SIGSEGV, my_va_handler);
signal(SIGFPE, my_va_handler);
int a = INT_MAX;
a /= 0;
2022-06-06 04:57:25 +00:00
return 0;
2022-06-05 22:02:54 +00:00
}