[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
crash on process-substitution of many processes
From: |
Gregory N. Price |
Subject: |
crash on process-substitution of many processes |
Date: |
Thu, 25 Mar 2004 01:35:32 -0500 |
User-agent: |
Mutt/1.2.5.1i |
This bug is unlikely to affect many actual users, but it imposes a
fixed upper limit, an irksome thing reminiscent of pre-GNU Unix
utilities. And anything that permits a crash is bad...
Gregory Price
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' -DSHELL -DHAVE_CONFIG_H -I.
-I/build/packages/bash/bash-2.05b -I/build/packages/bash/bash-2.05b/include
-I/build/packages/bash/bash-2.05b/lib -g -O2
uname output: Linux cross-cap 2.4.22.031115-eric #1 Sun Nov 16 00:20:14 EST
2003 i686 unknown unknown GNU/Linux
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
Bash can be made to fail unexpectedly by asking it to
process-substitute many times in one command.
Repeat-By:
Run the code below; either directly at the command line, or by putting
in a file and sourcing, or by putting in a file and sourcing within a
`bash -c'. You should get something like this:
$ bash -c '. bug-case'
252 is OK
253 is OK
malloc: /build/packages/bash/bash-2.05b/subst.c:3371: assertion botched
realloc: start and end chunk sizes differ
Stopping myself...Aborted
$
Here's the code:
one='<(echo)'
three="$one $one $one"
fifteen="$three $three $three $three $three"
sixtythree="$three $fifteen $fifteen $fifteen $fifteen"
twofiftytwo="$sixtythree $sixtythree $sixtythree $sixtythree"
twofiftythree="$one $sixtythree $sixtythree $sixtythree $sixtythree"
twofiftyfour="$one $one $sixtythree $sixtythree $sixtythree $sixtythree"
eval cat $twofiftytwo >/dev/null
echo "252 is OK"
eval cat $twofiftythree >/dev/null
echo "253 is OK" # this happens in some circumstances
eval cat $twofiftyfour >/dev/null
echo "254 is OK" # this doesn't happen in any case I've tried
- crash on process-substitution of many processes,
Gregory N. Price <=