[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash crashes after "fc"
From: |
Uwe Schneider |
Subject: |
Re: bash crashes after "fc" |
Date: |
Sat, 04 Aug 2001 21:10:41 +0200 |
uwe@richard-schneider.de wrote:
>
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux
> Compiler: gcc -I/usr/src/packages/BUILD/bash-2.05
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
> -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' -DCONF_VENDOR='suse'
> -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -I.
> -I./include -I./lib -I/usr/include -O2 -m486 -mcpu=i486 -march=i486
> -D_GNU_SOURCE -Wall -pipe
> uname output: Linux majestix 2.4.4-4GB #1 Wed May 16 00:37:55 GMT 2001 i586
> unknown
> Machine Type: i386-suse-linux
>
> Bash Version: 2.05
> Patch Level: 0
> Release Status: release
>
> Description:
> bash crashes after "fc" with SEGV.
>
> Repeat-By:
>
> pi@majestix ~ >bash
> pi@majestix ~ >echo $HOME
> /home/pi
> pi@majestix ~ >fc
> echo $HOME
> /home/pi
> Speicherzugriffsfehler (SEGV)
Electric fence tells me that there is a free too often in
builtins/fc.def at line 397. Maybe this has something to do with the
call to
add_unwind_protect ((Function *)xfree,
fn);
in line 632, but I have not understood the code thoroughly.
BTW. Can anybody explain me why the bash code has implemented xmalloc(),
xrealloc and xfree() three times and uses plain malloc/free in addition?
Best regards
Uwe
--
Uwe Schneider | Telefon +49 7251 / 82587
Karlsdorfer Str. 31 | Mail pi@richard-schneider.de
DE-76646 Bruchsal | http://www.richard-schneider.de/uwe
Linux - OS al dente!