This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
 echo 1 > $sprojdir/cpionbr
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

Attachment: whyu
Description: Text document

Attachment: massupdate.ksh
Description: Text document

Attachment: cygcheck.out
Description: Text document

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]