bug-bash
[Top][All Lists]
Advanced

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

arithmetic expansion crash


From: Tim Waugh
Subject: arithmetic expansion crash
Date: Wed, 3 Sep 2003 10:52:04 +0100
User-agent: Mutt/1.4.1i

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-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  -I.  -I. -I./include -I./lib 
-D_GNU_SOURCE  -O2 -g -pipe -march=i386 -mcpu=i686
uname output: Linux gene.surrey.redhat.com 2.4.21-20.1.2024.2.1.nptl #1 Fri Jul 
11 06:04:52 EDT 2003 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        Arithmetic expansion crashes on array cells with values: <num><word>*

        See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=103621

Repeat-By:
$ cat test.sh
#!/bin/bash
i=896786k; $(( i[0] ))
$ gdb --args ./bash ./test.sh -batch
GNU gdb Red Hat Linux (5.3.90-0.20030710.21rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db 
library "/lib/tls/libthread_db.so.1".
 
(gdb) run
Starting program: /home/twaugh/devel/pkgs/rpms/bash/bash-2.05b/bash ./test.sh 
-batch
./test.sh: line 2: 896786k: value too great for base (error token is "896786k")
 
Program received signal SIGSEGV, Segmentation fault.
0x08072dbc in evalexp (expr=0x155 <Address 0x155 out of bounds>, validp=0x8)
    at expr.c:314
314             *validp = 0;
(gdb) bt
#0  0x08072dbc in evalexp (expr=0x155 <Address 0x155 out of bounds>,
    validp=0x8) at expr.c:314
#1  0x0932bf08 in ?? ()
#2  0x00000155 in ?? ()
#3  0x00000008 in ?? ()
#4  0xbfef3978 in ?? ()
#5  0x000c3787 in ?? ()
#6  0x00000008 in ?? ()
#7  0x080c6ef2 in yystos ()
#8  0x00000155 in ?? ()
#9  0x00000001 in ?? ()
#10 0x0932e008 in ?? ()
(gdb) quit

Attachment: pgpd4j4ltTEBf.pgp
Description: PGP signature


reply via email to

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