bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash bug with cat and EOF


From: Keith Christian
Subject: Re: Bash bug with cat and EOF
Date: Thu, 17 Jan 2002 08:50:50 -0800 (PST)

This runs fine on my Mandrake 8.1 system:

[keith@mercury keith]$ !1025
cat xtest.sh
#!/bin/bash
cat >test_file <<EOF
write this
EOF

[keith@mercury keith]$ !1024
cat test_file
write this
[keith@mercury keith]$


Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-mand\rake-linux-gnu'
-DCONF_VENDOR='mandrake' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64  -I.  -I. \-I./include -I./lib -I/usr/include
-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-s\trength-reduce
uname output: Linux mercury 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST
2001 i686 unknown
Machine Type: i586-mandrake-linux-gnu

Bash Version: 2.05
Patch Level: 1
Release Status: release



--- mantesap@cti.gr wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
> -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include
> -O2 -march=i386 -mcpu=i686
> uname output: Linux ru2147.cti.gr 2.4.7-10enterprise #1 SMP Thu Sep 6
> 16:48:20 EDT 2001 i686 unknown
> Machine Type: i386-redhat-linux-gnu
> 
> Bash Version: 2.05
> Patch Level: 8
> Release Status: release
> 
> Description:
>       My Bash shell does not execute the following code correctly
>       
>       cat >test_file <<EOF
>       write this
>       EOF
>       
>       instead, a segmentation fault occured
> 
>       [mantesap@ru2147 mantesap]$ bash test
>       test: line 4: 24660 Segmentation fault      cat >test_file  <<EOF
>       write this
>       EOF
> 
>       As you can see I am running RH 7.2. The same problem appeared
>       on my older RH 7.0 which I upgraded to fix it, but the problem
>       remains. I cannot do a fresh install because I do not have the
>       means to backup my current files. I did an strace on another 
>       machine running RH 7.0 and I noticed one line was
>       open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE)     = 3
>       my machine "opens" /dev/tty like this
>       open("/dev/tty", O_RDWR|O_NONBLOCK)     = 3
> 
>       I tried bringing /bin/bash and /bin/cat from that machine to 
>       my machine but the problem remains so I suspect a shared library
>       or something else that didn't change after the upgrade.
> 
>       tcsh on my machine does it okay
> 
>       If someone has any idea how to fix it I'd really appreciate it.
>       I could give you login shell to see for yourself if you 
>       are trustworthy.
>       This script appears in many places inside a configure script
>       and this error prevents me from installing source. I had to do 
>       ksh /usr/bin/bashbug to create the report because of the problem.
> 
> 
> Repeat-By:
>       make a test script with the above three lines and run it.
> 
> _______________________________________________
> Bug-bash mailing list
> Bug-bash@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-bash


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]