Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15064 > unrolled thread
| Started by | "" <kfm@plushkava.net> |
|---|---|
| First post | 2019-06-21 20:22 +0100 |
| Last post | 2019-06-21 20:22 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Large compound commands resulting in a segfault "" <kfm@plushkava.net> - 2019-06-21 20:22 +0100
| From | "" <kfm@plushkava.net> |
|---|---|
| Date | 2019-06-21 20:22 +0100 |
| Subject | Large compound commands resulting in a segfault |
| Message-ID | <mailman.608.1561150003.10840.bug-bash@gnu.org> |
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 top | Article view | gnu.bash.bug
csiph-web