X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.131.211 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: BASH crashes upon exiting function? Organization: Systematic Software Message-ID: References: <71078E41DDE3E541B024832F34BC3D0DDDD4 AT cowexc03 DOT corp DOT mxtr DOT net> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 29 Date: Wed, 12 May 2004 01:37:39 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw1no 1084325859 24.71.223.147 (Tue, 11 May 2004 19:37:39 MDT) NNTP-Posting-Date: Tue, 11 May 2004 19:37:39 MDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Tue, 11 May 2004 17:33:55 -0600 in comp.os.msdos.djgpp, "Schumacher, Gordon" wrote: >Well, I *had* a test case, but I did something to it which caused it to >not crash anymore in the same manner. But in trying to re-reproduce the >crash, I've stumbled across something else fascinating (which may be the >crash in another form...) > >I'm now running with the code in djgpp/alpha, per what Andrew Cottrell >suggested, on a Windows 2000 box. When I run the attached script, my >computer performs the compile (as evidenced by the appearance of a .EXE >file in the directory) and then the computer goes unresponsive. Many >seconds later, I get the following message: > >/test.sh: xmalloc: ../variables.c:2292: cannot allocate 792674112 bytes (0 >bytes allocated) 792674112 just happens to be '/?? ' -- garbage allocation! >This only appeared when I added the FOO=`tmp_file_name` line - before >doing so, everything seemed to work properly. Try echoing each script variable set in each function. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca) fake address use address above to reply