[Top][All Lists]

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

Bash bug with cat and EOF

From: mantesap
Subject: Bash bug with cat and EOF
Date: Thu, 17 Jan 2002 12:27:10 +0200

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' 
-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

        My Bash shell does not execute the following code correctly
        cat >test_file <<EOF
        write this
        instead, a segmentation fault occured

        address@hidden mantesap]$ bash test
        test: line 4: 24660 Segmentation fault      cat >test_file  <<EOF
        write this

        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.

        make a test script with the above three lines and run it.

reply via email to

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