cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/21/05:01:38

From: Boon van der RJ <rjvdboon AT sloep36 DOT cs DOT vu DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: a rather strange error with global variables...
Date: 21 Oct 1998 08:53:25 GMT
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Lines: 30
Message-ID: <70k7e5$jad$1@star.cs.vu.nl>
References: <70k64a$gu$1 AT katie DOT vnet DOT net>
NNTP-Posting-Host: sloep36.cs.vu.nl
User-Agent: tin/pre-1.4-980730 (UNIX) (SunOS/5.5.1 (sun4u))
Originator: rjvdboon AT sloep36 DOT cs DOT vu DOT nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019