[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
segmentation fault in arithmetic expressions over arrays
From: |
Arnon Klein |
Subject: |
segmentation fault in arithmetic expressions over arrays |
Date: |
Mon, 09 Aug 2004 13:40:05 +0300 |
User-agent: |
Mozilla Thunderbird 0.6 (X11/20040502) |
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_FILE_OFFSET_BITS=64 -O2 -g -pipe -march=i386 -mcpu=i686
uname output: Linux lazuli 2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29
15:20:01 EST 2003 i686 athlon i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
When specifying an invalid arithmetic expression containing an array
reference, bash terminates with a segmentation fault. The same
expression, without array references does not crash.
Repeat-By:
# the following crashes
! vals=(-17.244008)
! echo $((vals[0]))
bash: -17.244008: syntax error in expression (error token is ".244008")
Segmentation fault
# the following does not crash
! val=-17.244008
! echo $((val))
bash: -17.244008: syntax error in expression (error token is ".244008")
- segmentation fault in arithmetic expressions over arrays,
Arnon Klein <=