freebsd-nq/usr.bin
Alan Somers cdb7a6fc42 Fix memory leaks during "tail -r" of an irregular file
* Rewrite r_buf to use standard tail queues instead of a hand-rolled
  circular linked list. Free dynamic allocations when done.
* Remove an optimization for the case where the file is a multiple of 128KB
  in size and there is a scarcity of memory.
* Add ATF tests for "tail -r" and its variants.

Reported by:	Valgrind
Reviewed by:	ngie
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9067
2017-01-10 20:43:32 +00:00
..
addr2line
alias
apply
ar ar: enable reproducible output by default when invoked as 'ar -s' 2016-06-16 21:22:26 +00:00
asa
at Use nitems() from sys/param.h 2016-07-30 06:32:18 +00:00
atm
awk WITH_META_MODE: Fix rebuilding maketab outside of build-tools. 2016-06-14 16:20:05 +00:00
banner
basename DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
bc
biff
bluetooth
bmake Merge bmake-20161212 2016-12-19 23:38:07 +00:00
brandelf
bsdcat MFV r307859: 2016-10-24 14:08:05 +00:00
bsdiff bspatch: Remove backwards-compatibility sys/capability.h support 2016-09-20 15:13:15 +00:00
bzip2
bzip2recover
c89
c99
caesar
calendar Add my birthday to calendar.freebsd 2017-01-10 05:37:53 +00:00
cap_mkdb
catman
chat Delete dead code in chat(8) 2017-01-04 16:24:40 +00:00
checknr Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
chkey
chpass
cksum
clang Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When 2017-01-06 23:05:29 +00:00
cmp Fix file descriptor leaks in cmp(1) 2017-01-07 00:59:06 +00:00
col DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
colcrt
colldef
colrm
column
comm Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
compile_et
compress
cpio MFV r307859: 2016-10-24 14:08:05 +00:00
cpuset Fix markup for -j in cpuset(1) synopsis 2016-07-29 21:18:20 +00:00
csplit
ctags
ctlstat Rewrite CTL statistics in more simple and scalable way. 2017-01-09 18:18:15 +00:00
cut
cxxfilt
dc DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
dirname DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
dpv
drill
dtc fdt: Expect strchr() to return a const char* 2016-11-26 12:36:11 +00:00
du Fix improper use of "its". 2016-11-08 23:59:41 +00:00
ee
elf2aout
elfcopy Retire WITHOUT_ELFCOPY_AS_OBJCOPY option 2016-10-03 17:49:26 +00:00
elfdump DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
enigma
env
expand
factor
false
fetch
file
file2c
find Use type-independent formats for printing nlink_t and ino_t. 2017-01-06 16:59:33 +00:00
finger
fmt
fold fold(1): Revert incorrect r308432 2016-11-15 00:24:18 +00:00
fortune Fix sorting after r308293, using the ../tools/do_sort script. 2016-11-05 15:01:41 +00:00
from
fstat
fsync
ftp
gcore Cleanup some leftovers from '-s' removal in r302792. 2016-11-17 23:16:56 +00:00
gencat
getconf Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs 2016-08-25 17:07:43 +00:00
getent Document getent(1)'s ability to enumerate netgroup members. 2016-06-04 21:34:06 +00:00
getopt DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
gprof
grdc
grep Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" 2016-08-02 20:25:22 +00:00
gzip Use type-independent formats for printing nlink_t and ino_t. 2017-01-06 16:59:33 +00:00
head
hesinfo
hexdump hexdump(1): First cut capsicumification 2016-12-16 02:03:40 +00:00
host
iconv iconv(1): Capsicumify 2016-12-16 02:06:34 +00:00
id
ident ident(1): Capsicumify 2016-12-16 02:09:48 +00:00
indent indent(1): add a piece missed in r311138. 2017-01-02 20:49:24 +00:00
ipcrm
ipcs
iscsictl Make the iSCSI parameter negotiation more flexible. 2016-08-25 05:22:53 +00:00
join
jot DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
kdump Update libsysdecode for getfsstat() 'flags' argument changing to 'mode'. 2017-01-03 01:39:05 +00:00
keylogin
keylogout
killall
ktrace
ktrdump ktrdump(8): Capsicumify 2016-12-16 01:59:28 +00:00
lam
last Capsicumify last(1) 2016-12-16 01:47:08 +00:00
lastcomm Fix .../usr.bin/lastcomm/legacy_test:main on i386 2016-07-03 17:52:21 +00:00
ldd Increase size of argv[] array to avoid running off the end. 2016-05-16 16:01:46 +00:00
leave
less
lessecho
lesskey
lex
limits
locale locale: fix the powerpc build 2016-12-06 15:42:18 +00:00
localedef localedef: Improve cc_list parsing 2016-10-06 19:51:30 +00:00
locate DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
lock
lockf
logger Fix gcc build. 2016-12-24 22:51:02 +00:00
login Clarify warning message when failing to configure audit on user login: 2016-11-30 14:02:36 +00:00
logins
logname DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
look
lorder lorder: produce locale-independent symbol ordering 2016-07-07 20:50:59 +00:00
lsvfs
lzmainfo
m4
mail mail(1): Minor declaration updates. 2016-07-15 20:27:21 +00:00
makewhatis
man
mandoc Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
mesg
minigzip Restructure libz, place vendor files in contrib/zlib like other third 2017-01-04 09:30:47 +00:00
ministat ministat(1): Capsicumify 2016-12-16 01:51:12 +00:00
mkcsmapper Revert the change from errx/strerror to errc to appease gcc 4.2 2016-07-09 06:52:55 +00:00
mkcsmapper_static
mkdep
mkesdb
mkesdb_static
mkfifo
mkimg Add a new flag to mkimg (-a num) to specify the active partition for 2016-10-18 05:43:12 +00:00
mklocale
mkstr
mktemp
mkuzip
morse
msgs
mt Add the density code for LTO-7 to libmt and the mt(1) man page. 2016-05-20 19:30:52 +00:00
nc
ncal ncal: fix a reference to an out-of-scope stack buffer 2016-11-05 14:08:14 +00:00
netstat Fix rstat: symbol not in namelist from netstat 2017-01-09 09:28:03 +00:00
newgrp
newkey Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted 2016-08-30 19:02:15 +00:00
nfsstat Use November instead of the abbreviation. 2016-11-26 20:58:05 +00:00
nice
nl Remove another occurence of _WITH_GETLINE 2016-07-31 19:02:19 +00:00
nm
nohup
numactl Don't repeat the the word 'the' 2016-05-17 12:52:31 +00:00
number
opieinfo
opiekey
opiepasswd
pagesize
pamtest
passwd
paste
patch patch(1): replace strnlen() with a simpler strlen(). 2017-01-02 18:27:35 +00:00
pathchk Add -P to pathchk usage 2016-07-09 04:56:28 +00:00
perror
pom
pr
primes primes: trivially capsicumize 2016-09-30 13:50:59 +00:00
printenv DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
printf
proccontrol DIRDEPS_BUILD: Connect new directories. 2016-09-23 22:46:19 +00:00
procstat Export the whole thread name in kinfo_proc 2016-12-07 15:04:22 +00:00
protect
quota
random Fix a (false positive?) Argument cannot be negative coverity defect. 2016-06-08 02:14:05 +00:00
rctl
readelf
renice
resizewin Make resizewin.1 manpage use .Fx macro 2016-07-29 21:05:17 +00:00
rev
revoke
rlogin
rpcgen Remove dead code in rpc_parse.c 2017-01-04 17:39:20 +00:00
rpcinfo
rs
rsh
rup
ruptime
rusers
rwall
rwho
script
sdiff Remove extra entries from the option enum 2016-12-30 23:46:11 +00:00
sed sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. 2016-11-04 20:49:59 +00:00
send-pr
seq Update history. Patch supplied by Sevan Janiyan <venture37@geeklan.co.uk>. 2016-09-16 14:23:16 +00:00
setchannel
shar
showmount
size
smbutil
sockstat This patch fixes two bugs: 2016-06-25 12:46:18 +00:00
soelim Revert capsicum support 2016-09-19 06:39:11 +00:00
sort - Use correct offsets into the keys set array. As the elements of this 2016-12-28 17:13:03 +00:00
split
ssh-copy-id
stat
stdbuf
strings
su
svn
systat Fix error in the example section 2016-12-05 13:23:22 +00:00
tabs
tail Fix memory leaks during "tail -r" of an irregular file 2017-01-10 20:43:32 +00:00
talk
tar MFV r307859: 2016-10-24 14:08:05 +00:00
tcopy
tee DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
telnet
tests
tftp
time
timeout
tip
top Style fixes 2017-01-09 00:29:23 +00:00
touch
tput
tr DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
true
truncate
truss Rework syscall structure lookups. 2016-12-06 00:39:00 +00:00
tset
tsort
tty tty: Use proper definition of exit status code and stdin macro 2016-08-16 14:15:09 +00:00
ul Do not truncate lines longer than 512 chars. 2016-07-11 08:05:46 +00:00
uname
unexpand
unifdef
uniq Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
units
unvis
unzip
usbhidaction
usbhidctl
users style(9) fix 2017-01-07 17:37:39 +00:00
uudecode
uuencode
vacation
vgrind
vi
vis
vmstat Remove a lingering reference to cache pages from vmstat(8). 2016-11-16 00:21:18 +00:00
vtfontcvt vtfontcvt: remove superfluous newlines in errx messages 2016-09-14 18:22:12 +00:00
w When -n is specified, don't make bogus DNS queries. Instead, 2016-09-02 18:28:14 +00:00
wall
wc
what
whereis
which
who
whois More robust handling of whois referrals from RIRs. 2016-11-17 15:19:06 +00:00
write DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
xargs
xinstall DIRDEPS_BUILD: Add some missing dirctories to the build. 2016-08-31 19:30:59 +00:00
xlint Fix improper use of "its". 2016-11-08 23:59:41 +00:00
xo
xstr
xz
xzdec
yacc
yes DIRDEPS_BUILD: Update dependencies. 2016-11-13 00:11:30 +00:00
ypcat
ypmatch
ypwhich
Makefile Add a WITHOUT_DIALOG src.conf(5) knob 2016-09-27 18:08:38 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc
Makefile.powerpc
Makefile.sparc64