bug-bash
[Top][All Lists]
Advanced

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

Re: bash segfault on unsetting bad associative array


From: Chet Ramey
Subject: Re: bash segfault on unsetting bad associative array
Date: Mon, 16 Aug 2010 11:33:25 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

On 8/16/10 5:05 AM, Roman Rakus wrote:
>  On 08/13/2010 03:55 PM, ordcoder wrote:
>> Configuration Information [Automatically generated, do not change]:
>> Machine: x86_64
>> OS: linux-gnu
>> Compiler: gcc
>> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
>> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
>> -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale'
>> -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include
>> -I./lib   -march=x86-64 -mtune=generic -O2 -pipe
>> uname output: Linux ordtop 2.6.34-ARCH #1 SMP PREEMPT Wed Aug 11
>> 00:23:15 CEST 2010 x86_64 Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz
>> GenuineIntel GNU/Linux
>> Machine Type: x86_64-unknown-linux-gnu
>> Bash Version: 4.1
>> Patch Level: 7
>> Release Status: release
>> Description:
>>          Bash quietly segfaults (exit status 139) when trying to unset
>> associative array which was incorrectly declared (however it didn't
>> complain when declaring it)
>>          Bash compiled from sources crashed (exit status 134) under the
>> same circumstances with the following output:
>>
>>          malloc: hashlib.c:306: assertion botched
>>          free: called with unallocated block argument
>>          last command: unset foo
>>          Aborting...Aborted
>>
>> Repeat-By:
>>          # Execute the following two commands at interactive prompt or
>> put them in file and execute it:
>>
>>          declare -A foo=bar
>>          unset foo
>>
> Already reported. So far, not patched.
> http://www.mail-archive.com/bug-bash@gnu.org/msg06014.html

Andreas posted the straightforward patch back in April.  If you want my
imprimatur, here it is.  This will be part of the next set of bash-4.1
patches.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Attachment: declare-assoc
Description: Text document


reply via email to

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