bug-bash
[Top][All Lists]
Advanced

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

unexpected EOF while looking for matching `)'


From: werner
Subject: unexpected EOF while looking for matching `)'
Date: Wed, 4 Mar 2009 14:13:41 +0100

Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-4.0 
-L/usr/src/packages/BUILD/bash-4.0/../readline-6.0
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-suse-linux-gnu' 
-DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -march=i586 -mtune=i686 
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 
-D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g -std=gnu89 -Wextra 
-Wno-unprototyped-calls -Wno-switch-enum -Wno-unused-variable 
-Wno-unused-parameter -ftree-loop-linear -pipe -fprofile-use
uname output: Linux boole 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 
i686 i386 GNU/Linux
Machine Type: i586-suse-linux-gnu

Bash Version: 4.0
Patch Level: 0
Release Status: release

Description:
        A simple expression can cause the error message
            unexpected EOF while looking for matching `)'
            syntax error: unexpected end of file
        the atachetd patch seems to work around ... maybe
        there is a better method in parse_comsub()

Repeat-By:
        bash -c 'echo $(echo aaa | egrep kernel.org\|rpmify)'

Fix:
--- parse.y
+++ parse.y     2009-03-04 13:05:43.128904662 +0000
@@ -3420,6 +3420,11 @@ eof_error:
          RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
          if MBTEST(ch == CTLESC || ch == CTLNUL)
            ret[retind++] = CTLESC;
+         else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0)
+{
+           count--;
+/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/
+}
          ret[retind++] = ch;
          continue;
        }




reply via email to

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