Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14689 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-10-06 12:33 -0400 |
| Last post | 2018-10-06 12:33 -0400 |
| 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.
Re: Segfault on recursive trap/kill Chet Ramey <chet.ramey@case.edu> - 2018-10-06 12:33 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-10-06 12:33 -0400 |
| Subject | Re: Segfault on recursive trap/kill |
| Message-ID | <mailman.1763.1538843614.1284.bug-bash@gnu.org> |
On 10/5/18 9:33 PM, Mike Gerwitz wrote: > The following code will cause a segfault on bash-4.4.19(1) on > GNUÂ Guix. I reproduced the issue on an old Ubuntu 14.04 LTS running > bash-4.3.11(1) as well as a Trisquel system running the same version. > > bash -c 'trap "kill 0" TERM; kill 0' > > Also segfaults when replacing `0' with `$$', and presumably in any other > situation that would trigger the trap recursively. Yes. Bash has allowed recursive trap handlers since early 2014 (pre-4.3) due to requests for the feature and compatibility with other shells that allow it. If you manage to create infinite recursion, bash won't stop you. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web