delorie.com/djgpp/bugs/show.cgi   search  
Bug 000093

When Created: 06/22/1996 12:47:12
Against DJGPP version: 2.00
By whom: norup@astro.ku.dk
Abstract: djgpp crash during assignment to large list of structures
I am having trouble compiling a piece of source code using djgpp 2.0,
as it results in a "general protection fault".

The code is rather simple: Room for an array of a structure is allocated,
and values are assigned to the array.

The smallest version of the code that crashes is about 32kb, so I have not
posted it here. To take a look at it, use anonymous ftp to
"aauobs.obs.aau.dk" cd to "/pub/norup/djgpp" and get "crash.zip"

It compiles and runs nicely under Borland C 3.1 and compiles under Linux gcc.

The crash seems to be associated with the size of the array: similar, smaller
arrays are accepted without problems, and if the last four structures
from (object[id].facet+82)-> are commented out, it compiles without
crashing.

I would really appreciate if this problem with djgpp would be looked into,
or perhaps just a work-around could be found.

Thanks,
Anton Norup Soerensen
norup@astro.ku.dk

Solution added: 06/24/1996 03:39:15
By whom: norup@astro.ku.dk
I'm not sure whether this is a workaround or a solution. Nevertheless:
Compilation was possible for the source example given when changing the
stack size of cc1.exe to 512kb.

Anton Norup Soerensen

Fixed in version 2.01 on 07/26/1996 00:31:33
By whom: dj@delorie.com



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