delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/02/05:36:16

Date: Thu, 2 Sep 1999 10:38:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Alex Matulich <alex AT unicorn DOT us DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Pentium "General Protection Fault" (works on 486)
In-Reply-To: <199909011517.AA24319@waltz.rahul.net>
Message-ID: <Pine.SUN.3.91.990902103731.4794B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 1 Sep 1999, Alex Matulich wrote:

> Someone else replied and solved the problem -- he said he had a
> similar experience when one of his modules included a function
> called freelist(), which collided with a function of the same name
> in the library.

`freelist' in the library isn't a function, it's an array used by
`malloc'.  And that's exactly why the program crashes: the first time
the startup code calls `malloc' (to allocate the `environ' array),
`freelist' should be zeroed out, but it isn't!

> However, it seems to me that the real solution would be to make
> freelist() static in the library

Yes.  The current development sources already do that, so this problem
will go away when DJGPP v2.03 is released.

- Raw text -


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