freebsd-dev/contrib
Konstantin Belousov 8495e8b1e9 Fix known issues which blow up the process after dlopen("libthr.so")
(or loading a dso linked to libthr.so into process which was not
linked against threading library).

- Remove libthr interposers of the libc functions, including
  __error(). Instead, functions calls are indirected through the
  interposing table, similar to how pthread stubs in libc are already
  done.  Libc by default points either to syscall trampolines or to
  existing libc implementations.  On libthr load, libthr rewrites the
  pointers to the cancellable implementations already in libthr.  The
  interposition table is separate from pthreads stubs indirection
  table to not pull pthreads stubs into static binaries.

- Postpone the malloc(3) internal mutexes initialization until libthr
  is loaded.  This avoids recursion between calloc(3) and static
  pthread_mutex_t initialization.

- Reinstall signal handlers with wrapper on libthr load.  The
  _rtld_is_dlopened(3) is used to avoid useless calls to sigaction(2)
  when libthr is statically referenced from the main binary.

In the process, fix openat(2), swapcontext(2) and setcontext(2)
interposing.  The libc symbols were exported at different versions
than libthr interposers.  Export both libc and libthr versions from
libc now, with default set to the higher version from libthr.

Remove unused and disconnected swapcontext(3) userspace implementation
from libc/gen.

No objections from:	deischen
Tested by:	pho, antoine (exp-run) (previous versions)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-03 18:38:46 +00:00
..
amd Remove the names of the build host and user and the build date. This 2014-04-12 18:01:25 +00:00
apr Merge apr-1.4.8 -> apr-1.5.1 and update. 2014-05-27 07:15:14 +00:00
apr-util Merge apr-util 1.5.3 -> 1.5.4. A minor bug fix update. 2014-09-24 18:38:51 +00:00
atf MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
binutils In contrib/binutils/bfd/elf32-ppc.c, avoid warnings about case values 2014-12-29 00:10:43 +00:00
bmake Update to bmake-20140620 2014-07-08 22:27:50 +00:00
bsnmp Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys and 2014-12-27 20:58:01 +00:00
byacc Regen test cases for yacc(1) after r274460. YYINT is int now. 2014-11-13 17:54:17 +00:00
bzip2 Remove unknown macro 2014-12-26 07:36:42 +00:00
com_err
compiler-rt Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct 2014-04-06 09:14:11 +00:00
dialog
diff Fix a cut and paste error. 2014-01-05 23:28:03 +00:00
dma Fix build on i386 2014-02-21 16:14:40 +00:00
dtc Merge from vendor branch importing dtc git rev 6a15eb2350426d285130e4c9d84c0bdb6575547a 2014-01-27 19:37:35 +00:00
ee Fix .TH having too many arguments 2014-12-26 07:34:42 +00:00
elftoolchain readelf: Correct rounding on note padding 2015-01-02 20:49:43 +00:00
expat
file MFV r276568: 2015-01-02 21:20:02 +00:00
flex
gcc Allow -march=armv7a on the gcc command line, for compatibility with clang. 2014-12-21 23:45:13 +00:00
gcclibs Avoid "cc1: warning: is shorter than expected" when using GNU cpp in 2014-03-26 19:57:50 +00:00
gdb recognize the FreeBSD ARCH tag that is put on binaries like on armeb 2014-02-12 02:03:37 +00:00
gdtoa
gperf gperf: reverse size_type patch from r258115. 2014-01-07 01:40:49 +00:00
groff Pull up vendor changes up to 2014-01-29 2014-01-31 12:26:30 +00:00
hyperv/tools Test errno against EEXIST as well. 2014-11-11 16:49:33 +00:00
ipfilter #552 destination port not zero after parsing nat rule 2014-09-22 16:35:48 +00:00
jemalloc Fix known issues which blow up the process after dlopen("libthr.so") 2015-01-03 18:38:46 +00:00
ldns Don't cast away the const qualifier. Fixes gcc build. 2014-05-16 15:32:16 +00:00
ldns-host
less
libarchive Fix the following -Werror warning from clang 3.5.0, while building 2014-11-22 12:10:09 +00:00
libbegemot
libc-pwcache
libc-vis Merge from NetBSD: 2014-09-08 19:26:21 +00:00
libc++ Pull in r200010 from upstream libc++ trunk (by Marshall Clow): 2015-01-01 22:49:17 +00:00
libcxxrt Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. 2014-12-30 20:01:06 +00:00
libexecinfo
libgnuregex
libpcap Add netmap support to libpcap. Tcpdump and other native pcap application can now 2014-10-06 15:48:28 +00:00
libreadline
libstdc++ Fix EABI unwind function declarations to match the function definitions. 2014-07-22 20:32:24 +00:00
libucl Update libucl to latest version 2014-11-29 00:45:09 +00:00
libxo Output strerror from xo_warn 2014-12-27 01:06:19 +00:00
llvm Add clang and llvm patches corresponding to r276516 and r276537. 2015-01-02 14:58:41 +00:00
mdocml Update mandoc to 1.13.2 2014-12-25 21:56:56 +00:00
mknod
mtree Import in latest mtree from NetBSD to fix a bug in parsing group files 2014-10-28 17:52:26 +00:00
ncurses Workaround a GCC warning to unbreak ARM build. 2014-03-03 08:01:36 +00:00
netbsd-tests Link lib/libc/c063 tests to the build. 2015-01-02 22:49:05 +00:00
netcat MFV r273617: netcat from OpenBSD 5.6. 2014-10-25 00:37:35 +00:00
ngatm
ntp Fix multiple ntp vulnerabilities. 2014-12-22 18:54:55 +00:00
nvi Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix 2013-12-08 00:08:03 +00:00
ofed Add proper Makefiles to build some infiniband example utilities. 2014-12-26 10:25:34 +00:00
one-true-awk awk: Use random(3) instead of rand(3) 2014-09-19 18:24:02 +00:00
openbsm Fix descriptors leak. 2014-09-14 09:26:33 +00:00
openpam Staticize the test plans. 2014-11-05 20:13:18 +00:00
openresolv
opie Last '/' for program name, not first one 2014-08-11 14:46:09 +00:00
pam_modules/pam_passwdqc
pf Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
pjdfstest Increase the memory disk size in the following testcases to avoid mount 2014-09-24 22:51:16 +00:00
pnpinfo
sendmail Update for sendmail 8.14.9 import 2014-05-22 04:41:11 +00:00
serf Update serf-1.3.6 -> 1.3.7 2014-08-11 19:41:01 +00:00
smbfs Make it possible to use empty user name ("-U ''") for mount_smbfs(8). 2014-09-08 11:01:57 +00:00
sqlite3 Update sqlite3 to 3.8.7.2 2014-11-22 19:18:08 +00:00
subversion Sync the svn template with the one from ports 2014-12-02 00:23:26 +00:00
tcp_wrappers tcpd.h: add prototype for hosts_ctl 2014-10-11 18:54:37 +00:00
tcpdump Fix comment and sort rights by name 2014-10-06 15:03:08 +00:00
tcsh
telnet Add baud rate support to telnet(1) 2014-11-11 04:06:05 +00:00
tnftp [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2). 2014-11-04 23:29:29 +00:00
top - Add J command to help. 2014-05-02 23:47:14 +00:00
traceroute
tzcode Revert WiP to contrib/tzcode accidentally committed with r274364 2014-11-11 04:07:41 +00:00
tzdata MFV of 274557,tzdata{2014j} 2014-11-16 01:00:39 +00:00
unbound Add generated files. 2015-01-03 11:52:43 +00:00
unvis
vis Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
wpa convert to using pidfile... This prevents multiple wpa_supplicants 2014-06-22 10:00:33 +00:00
xz MFV r273494: xz 5.0.7. 2014-10-23 00:40:56 +00:00