www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/07/20:45:42

From: Vic <tudor AT cam DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Struct gives a GPF
Date: Sat, 07 Mar 1998 20:37:18 +0200
Organization: Communications Accessibles Montreal, Quebec Canada
Lines: 17
Message-ID: <350193DE.1337@cam.org>
References: <3501b1f3 DOT 61286 AT news DOT unisys DOT com DOT br>
NNTP-Posting-Host: dialup-41.hip.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Bruno Barberi Gnecco wrote:
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=0000177d
You should know the majority of SIGSEGVs are pointer that are either
uninitialised (your case) or initialised somewhere in space....
>     int *point, *infr, *temp;
those are pointers. they point. they don't hold anything. you should
make them point at something useful, like pointer=&variable, or allocate
some memory to them:

point=malloc(sizeof(int));
infr=malloc(sizeof(int));
temp=malloc(sizeof(int));

add this and you should be fine. Have a nice day.
-- 
--> http://www.cam.org/~tudor <--

- Raw text -


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