Files
freebsd/bin
Jilles Tjoelker 3e989c8cc2 MFC r314686: sh: Fix crash if a -T trap is taken during command substitution
Code like  t=$(stat -f %m "$file")  segfaulted if -T was active and a trap
was taken while the shell was waiting for the child process to finish.

What happened was that the dotrap() call in waitforjob() was hit. This
re-entered command execution (including expand.c) at a point not expected by
expbackq(), and global state (unallocated stack string and argbackq) was
corrupted.

To fix this, change expbackq() to prepare for command execution to be
re-entered.

Reported by:	bdrewery
2017-03-12 18:38:03 +00:00
..
2016-12-03 02:47:16 +00:00
2016-10-10 15:47:39 +00:00
2016-10-10 16:08:29 +00:00
…
2017-02-03 16:57:14 +00:00
2016-12-21 22:53:10 +00:00
2016-10-16 23:09:55 +00:00
2016-12-26 16:27:01 +00:00
2016-10-16 23:11:33 +00:00
2016-12-12 02:13:35 +00:00
…
2017-02-23 07:42:49 +00:00
2017-01-13 13:37:09 +00:00
2016-12-15 16:51:33 +00:00
2017-02-17 11:20:55 +00:00
…
…
2016-10-16 23:15:33 +00:00
…
2016-10-16 23:19:14 +00:00
…