grub2: bring back build of aros-side grub2 tools
[AROS.git] / test / kernel / stackcheck.c
blob95581adb8839154fcbc82fcb7f806c16c5dc2331
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/tasks.h>
7 #include <proto/dos.h>
8 #include <proto/exec.h>
10 #include <stdio.h>
12 int __nocommandline = 1;
14 int main(void)
16 int i;
17 struct Task *t = FindTask(NULL);
19 printf("Attempting weird suicide...\n");
21 /* Simulate runaway stack */
22 t->tc_SPLower = (APTR)10;
23 t->tc_SPUpper = (APTR)16;
25 for (i = 1; i < 6; i++)
27 printf("%d...\n", i);
28 /* Delay() should eventually end up in core_Dispatch() which should kill us */
29 Delay(50);
32 printf("Stack checking FAILED! GO FIX IT!\n");
33 return 0;