summaryrefslogtreecommitdiff
path: root/test_c_crash.c
blob: d05bf66e77cd12c11f6544273dca91a90101b183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<stdio.h>
#include<stdlib.h>
#include<time.h>

void tmpfun();
void tmpfun2();

int main(int argc, char** argv)
{
	srand(time(NULL));
	int random = rand()%2;
	printf("crash test");
	if(random == 1)
		tmpfun();
	return EXIT_SUCCESS;
}

void tmpfun()
{
    tmpfun2();
}

void tmpfun2()
{
    *(char *)0 = 0;
}