delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/31/06:42:07

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: internal error alloc with echo/cat and workaround
Date: Mon, 31 Dec 2007 03:41:19 -0800
Message-ID: <BD6B3BD6A3C3EC4FBC45FF024CE104370636E22F@WAPRDVSEBE10.gsm1900.org>
In-Reply-To: <be8a925a0712290519k56c8dfa4h766c33de95d5572b@mail.gmail.com>
References: <be8a925a0712290519k56c8dfa4h766c33de95d5572b AT mail DOT gmail DOT com>
From: "Stepp, Charles" <Charles DOT Stepp AT T-Mobile DOT com>
To: "Irving Bunton" <ibuntonjr AT gmail DOT com>, <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id lBVBfqDo010299

How about trying cpio_nbr=$(<$sprojdir/cpionbr). That "cat <" is
unnecessary. For that matter, the '<' is unnecessary with the use of
'cat'. That error looks like a bug to be pursued, though.

Charles Stepp
Meskimen's Law:
There's never time to do it rite, but there's always time to do it over.
-----Original Message-----
From: Irving Bunton [mailto:ibuntonjr AT gmail DOT com] 
Sent: Saturday, December 29, 2007 8:19 AM
To: cygwin AT cygwin DOT com
Subject: internal error alloc with echo/cat and workaround

I have a ksh shell script that does echo/cat to from a file which is
on a mounted file system
C:\home               58612648  56353660   2258988  97% /home
The ksh script file on the mounted file system is
/home/irvb/bin/massjupdate.ksh (attached)
Like all ksh scripts it has !#/bin/ksh as the first line.
I was executing the ksh script from another script /tmp/whyu (attached)

In the ksh script that has the problem (massjupdate.ksh),
I was using echo/cat to/from a file ($sprojdir/cpionbr) which is also
on a mounted file system
C:\var\opt\bea        58612648  56353784   2258864  97% /var/opt/bea

For example in the ksh shell script on the mounted volume
(/home/irvb/bin/massjupdate.ksh)
 echo 1 > $sprojdir/cpionbr
and
cpio_nbr=$(cat < $sprojdir/cpionbr)

I get this error
internal error: alloc: freeing memory outside of block (corrupted?)

This is diffucult to isolate as when I put the equivalent line in a
ksh on a mounted file system, it has no problem.
When I change the script to be sh vs ksh, the error goes away.
Another way to avoid the error is to use cd to change to the directory
for ksh which has the problem
for example
cd $sprojdir/cpionbr
echo 1 > cpionbr
cpio_nbr=$(cat < cpionbr)
cd $spwd

Or use sh as well to avoid the problem (i.e. #!/bin/sh instead of
#!/bin/ksh

I was also using one shell script to call the other one

I used the 1.5.24-2 as well as the lastest version 1.5.25-7 and have
the same problem

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019