bug-bash
[Top][All Lists]
Advanced

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

Segmentation fault after fc command in bash script


From: address@hidden
Subject: Segmentation fault after fc command in bash script
Date: Sun, 17 Apr 2011 12:28:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; it-IT; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


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-redhat-linux-gnu'
- -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
-DSHELL
- -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE -DRECYCLES_PIDS
- -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m64 -mtune=generic
uname output: Linux dabbasciano 2.6.35.12-88.fc14.x86_64 #1 SMP Thu Mar 31
21:21:57 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 4.1
Patch Level: 7
Release Status: release

Description:
I tried to write a simple bash script like this:
   #!/bin/bash
   fc -l -2
When I run for the first time it works well, but if I execute again the script I
receive a "Segmentation fault (core dumped)" and the bash die.

Repeat-By:
To reproduce the problem you must create a simple script with the follow 2 
lines:
   #!/bin/bash
   fc -l -2
and then run the script for 2 time. The output is:
   $ . fc.sh
   1000  cd prog/script/
   1001  . fc.sh
   $ . fc.sh
   1001  . fc.sh
   Segmentation fault (core dumped)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNqsDRAAoJEDSpnBSp0g/Yh2oH/3Z1UwsgnZctN8FSpHAksKIl
1yxGRLqhLQw8D8wONUUI1FEpyy5jAgXELhx4TQbSAf0X/NlNqY/j/6UkGIeokQnA
tE75SYUnAqKPk55o8Bv6fKnvmVJZdh7gSZOVmMuXZXHeHmcWcWBL5YsyKiv3pUwh
nPhTa6DJAXOLMW6dCej1wXhp6TVQQyH7q22UBhDHweY1pcF3EGPKCZ0gGCQbr1NM
fs5qtoOoZoA1c7Mp+q1DX6MFIwuXKijOw6DjqjNVtbLWxEYui4lCOMQV7y2fNpT/
EY+gjIquMCO2BXRtFJbVFPAY+90JU/zb4m7NmmyX2XM+0Hz5lqfpZ96soTGu4T0=
=5NuS
-----END PGP SIGNATURE-----



reply via email to

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