🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1880

dynamic arrays with insufficient space cause core dump

#1880
From: Matthew Self
Date: Sat, 08 Oct 1988 06:19
22 lines
1558 bytes
  After converting my latest program to use dynamic arrays, I tried
running it on some very large data sets to see how it would break.
Unfortunately, it appears that if there is insufficient space to
allocate a dynamic array, the program just dumps core with no
explanation.  My previous code which did all of the dynamic allocation
through malloc would explain that malloc refused the program the space
it wanted, and would even mention which array couldn't be allocated.
It would be nice if programs compiled with gcc using dynamic arrays
did something along these lines.  An even more difficult problem
arises if the program can work around the lack of space problem and
wishes to continue execution some other way.  Perhaps in this case the
program just shouldn't use dynamic arrays and should call an
allocation routine explicitly.  The only other solutions would seem to
require adding new extensions to c, which should probably be avoided.
I haven't yet looked at the source to see how any of this might be
done.
  A penny for your thoughts....

			Matthew Self
		  NASA Ames Research Center
		   self@bayes.arc.nasa.gov
Technical Details
Message-ID: <8810080619.AA04216@bayes.arc.nasa.gov>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!self

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!self
From: self@BAYES.ARC.NASA.GOV (Matthew Self)
Newsgroups: gnu.gcc.bug
Subject: dynamic arrays with insufficient space cause core dump
Message-ID: <8810080619.AA04216@bayes.arc.nasa.gov>
Date: 8 Oct 88 06:19:36 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 22