Date: Thu, 2 Sep 1999 10:38:29 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Alex Matulich 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.