Result of "( false )" is 0, should be 1

2007-04-12 Thread yozh
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux banana.mx1.ru 2.4.27-2-686 #1 Fri Mar 25 11:48:59 JST 2005 
i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
Result of "( false )" is 0, should be 1

Repeat-By:

Code:

===
set -e
( false )
echo "not visible"
===

Execute in bash. You will see "not visible". Expecting that nothing is 
printed
and script exited with error.

Also in version 3.2.10(1)-release

Fix:
[Description of how to fix the problem.  If you don't know a
fix for the problem, don't include this section.]


___
Bug-bash mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-bash


-e does not work with subscript

2008-01-28 Thread yozh
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux hilbert 2.6.18-openvz-amd64 #1 SMP Tue Apr 10 19:34:07 MSD 
2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
failed subscript does not cause script to exit, while -e is set

Repeat-By:

% cat aa.sh   
set -e

(
false
)

echo "unreachable"

% bash ./aa.sh
unreachable
% zsh ./aa.sh 
zsh: exit 1 zsh ./aa.sh

Script aa.sh is expected to exit with error and print nothing. In bash 
it prints "unreachable".





-e does not work properly with subscript

2008-01-28 Thread yozh
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux fireball 2.6.20-1-686-bigmem #1 SMP Wed Apr 25 11:30:36 UTC 
2007 i686 GNU/Linux
Machine Type: i386-pc-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
failed subscript should cause script to exit if set -e

Repeat-By:
% cat aa.sh 
set -e

( false )

echo "end"
% bash aa.sh 
end
% zsh aa.sh
zsh: exit 1 zsh aa.sh

Script aa.sh should print nothing and exit with error. Under bash it 
prints "end" and exits with 0 code.




infinitive recursion causes segfault

2009-02-05 Thread yozh
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux fastshot.yandex.ru 2.6.20-1-686-bigmem #1 SMP Wed Apr 25 
11:30:36 UTC 2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
Create a function that calls itself. Call it. You'll get segfault. 
Expecting message on terminal.

Repeat-By:
f() { f x; }; f

bash segfaults.