1 | #include <OS.h>
|
---|
2 | #include <stdio.h>
|
---|
3 |
|
---|
4 |
|
---|
5 | int main(int argc, char** argv) {
|
---|
6 |
|
---|
7 | // If disable_debugger is true the app continues and eats all cpu
|
---|
8 | disable_debugger(true);
|
---|
9 |
|
---|
10 | (void)argc; (void)argv;
|
---|
11 |
|
---|
12 | fprintf(stdout, "Output before crash on stdout from crash test.\n");
|
---|
13 | fprintf(stderr, "Output before crash on stderr from crash test.\n");
|
---|
14 | fflush(stdout);
|
---|
15 | fflush(stderr);
|
---|
16 |
|
---|
17 | // BOOM!
|
---|
18 | *(int*)0 = 0;
|
---|
19 |
|
---|
20 | fprintf(stdout, "Output after crash on stdout from crash test.\n");
|
---|
21 | fprintf(stderr, "Output after crash on stderr from crash test.\n");
|
---|
22 |
|
---|
23 |
|
---|
24 | return 0;
|
---|
25 | }
|
---|