1 |
|
---|
2 | #include <stdio.h>
|
---|
3 | #include <stdlib.h>
|
---|
4 | #include <string.h>
|
---|
5 |
|
---|
6 | # include <os/kernel/OS.h>
|
---|
7 |
|
---|
8 | void main() {
|
---|
9 | #if defined(__BEOS__) || defined(__HAIKU__)
|
---|
10 | /* Avoid error diagnostic popups since we are crashing on purpose. */
|
---|
11 | disable_debugger(1);
|
---|
12 | #endif
|
---|
13 | fprintf(stdout, "Output before crash on stdout from crash test.\n");
|
---|
14 | fprintf(stderr, "Output before crash on stderr from crash test.\n");
|
---|
15 | fflush(stdout);
|
---|
16 | fflush(stderr);
|
---|
17 | *(int*)0 = 0;
|
---|
18 | fprintf(stdout, "Output after crash on stdout from crash test.\n");
|
---|
19 | fprintf(stderr, "Output after crash on stderr from crash test.\n");
|
---|
20 | return 0;
|
---|
21 | }
|
---|