Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15064
| From | "" <kfm@plushkava.net> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Large compound commands resulting in a segfault |
| Date | 2019-06-21 20:22 +0100 |
| Message-ID | <mailman.608.1561150003.10840.bug-bash@gnu.org> (permalink) |
| References | <20190621202246.18fcb57ce720acc9095d3e0f@plushkava.net> |
Hi,
The following script generates a compound command consisting of many instances of the : command. I have found that it reproducibly induces a segfault in all versions of bash from 2 onwards. I tested various other shells - several more than are implied here - all of which could handle the generated code without issue.
#!/bin/bash
shells=('busybox sh' dash posh ksh mksh bash)
code=$(printf '{ '; printf '%.s:; ' {1..50000}; printf '}')
for shell in "${shells[@]}"; do
type "${shell%% *}" &>/dev/null || continue
echo "testing: $shell"
echo "$code" | $shell || echo "$shell failed"
done
--
Kerin Millar <kfm@plushkava.net>
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Large compound commands resulting in a segfault "" <kfm@plushkava.net> - 2019-06-21 20:22 +0100
csiph-web