freebsd-dev/bin
Jilles Tjoelker 586fd24857 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
MFC after:	1 week
2017-03-04 22:58:34 +00:00
..
cat Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
chflags Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
chio Document where chio(1) originated from & which version of FreeBSD first included it. 2016-10-05 18:26:39 +00:00
chmod Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cp Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
csh bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
date Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
df bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
domainname Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
echo Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
expr Document origins of expr & authors 2016-10-05 19:26:35 +00:00
freebsd-version bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
getfacl Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
hostname Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kenv style(9). 2016-11-28 07:21:09 +00:00
kill Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ln Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ls Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mkdir Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mv Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pax Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pkill Increase timeouts so tests have more chances to succeed 2016-10-19 12:23:02 +00:00
ps ps(1): Only detect terminal width if stdout is a tty 2017-03-04 22:38:10 +00:00
pwait Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
pwd Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rcp Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
realpath Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rm Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rmail bin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:31:08 +00:00
rmdir Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
setfacl Explicitly NUL terminate the buffer filled by fread(). 2016-06-08 05:32:39 +00:00
sh sh: Fix crash if a -T trap is taken during command substitution. 2017-03-04 22:58:34 +00:00
sleep Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
stty Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sync Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
test Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
uuidgen uuid_to_string(3) is allocating memory and can fail on that. 2016-08-03 18:04:08 +00:00
Makefile Start using the fact that SUBDIR.yes is added to SUBDIR 2015-10-05 21:41:55 +00:00
Makefile.inc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00