Article View: gnu.g++.bug
Article #1768alloca's in ld.c cause seg-faults
From: Othar Hansson
Date: Tue, 21 Mar 1989 03:47
Date: Tue, 21 Mar 1989 03:47
33 lines
1220 bytes
1220 bytes
Date: Mon, 20 Mar 89 09:14:22 PST
From: mdt@yahi.stanford.edu (Michael Tiemann)
Reply-To: tiemann@lurch.stanford.edu
Date: Sun, 19 Mar 89 20:02:45 PST
From: othar@cs.ucla.edu (Othar Hansson)
ld++ exits with a segmentation fault when fed source files with large
data segments. The fault is caused by an attempt to 'alloca' a large
chunk of memory in 'copy_data()' in ld.c
bytes = (char *) alloca (entry->header.a_data);
This problem may be fixable by doing this:
unlimit stacksize
Or, do this:
limit
see what the limit of stacksize is (say 2048K), multiply it by 4, and
set a new limit:
limit stacksize 8192
That did the trick -- "ulimit -s 8192" in ksh.
Thanks,
Othar
Technical Details
Message-ID:
<8903210347.AA20502@maui.cs.ucla.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CS.UCLA.EDU!otharReferences:
<8903201714.AA24798@yahi>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CS.UCLA.EDU!othar From: othar@CS.UCLA.EDU (Othar Hansson) Newsgroups: gnu.g++.bug Subject: alloca's in ld.c cause seg-faults Message-ID: <8903210347.AA20502@maui.cs.ucla.edu> Date: 21 Mar 89 03:47:29 GMT References: <8903201714.AA24798@yahi> Sender: daemon@tut.cis.ohio-state.edu Reply-To: othar@cs.ucla.edu Distribution: gnu Organization: Slinky Toy Co. Lines: 33