Mail Archives: djgpp/1998/10/21/05:01:38
Paul Byrne <byrne AT katie DOT vnet DOT net> wrote:
> I've been getting some unusual errors with a program I'm writing. I was
> writing temporary code to help test some new classes. I included the
> following global variables:
> char m[256][256];
> int v[256][256];
> int t[256][256];
> int e[256][256];
> and everything worked fine. However, simply changing the order to
> int e[256][256];
> char m[256][256];
> int v[256][256];
> int t[256][256];
> causes problems. Everything compiles fine. Running produces a SIGSEGV.
SIGSEGV's usually mean you dereference a NULL-pointer somewhere, but
on a DOS-box in windows you should get away with it (too bad)
Read the newest faq (v2/faq211b.zip from simtel), chapter 12(.1 and .2),
for possible causes and fixes.
If you aren't able to find out what's going wrong, post here:
- The compile command (output of gcc -v $(YOUR_CFLAGS))
- The (symified) stack-dump
- The smallest piece of code which exposes the problem (if it's small)
hth,
Robert
--
rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak ex-Staatsecretaris-
www.cs.vu.nl/~rjvdboon | van-Onderwijs Netelenbos fel.
- Raw text -