home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!destroyer!cs.ubc.ca!news.UVic.CA!ugly!aramsey
- From: aramsey@ugly.UVic.CA (Aaron Ramsey)
- Subject: What is wrong with this very simple c program?
- Message-ID: <1992Nov10.184406.25907@sol.UVic.CA>
- Summary: help?????
- Sender: news@sol.UVic.CA
- Nntp-Posting-Host: ugl-gw.uvic.ca
- Organization: University of Victoria, Victoria, BC, Canada
- Date: Tue, 10 Nov 92 18:44:06 GMT
- Lines: 34
-
- I wrote this as part of a larger program, and it keeps locking up my machine.
- When I run it, it prints "started....done...." then my machine either locks
- up, or a requestor comes up asking me to either suspend or reboot. The
- guru error on this is 81000004. I can't figure out why such a simple program
- should be doing this. I tried setting my stack very very high to see if
- that made any difference (stack 200000) but it still did the same. If I use
- the ordinary stack size (whatever that might be... around 2000 I guess)
- the program terminates with a stack overflow error, but doesn't lock up
- my machine. I have a vxl-30, and have tried compiling it under both 030
- and normal 000 code, but it makes no difference.... Does anybody have
- a clue? I've only been programming in C for a week or two, and I can't
- spot any obvious problems... 8-(
-
- Here is the code.
-
- #include <stdio.h>
-
- main()
- {
- int zoop[1000];
- int counter;
-
- printf ("started....");
- for (counter = 0; counter < 5000; counter += 5) {
- zoop[counter] = counter;
- }
- printf("done....");
- }
-
-
- Well... I hope somebody can see my mistake....
-
- -Aaron
-
-