X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: internal error alloc with echo/cat and workaround Date: Mon, 31 Dec 2007 03:41:19 -0800 Message-ID: In-Reply-To: References: From: "Stepp, Charles" To: "Irving Bunton" , Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit 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/