Commit Graph

17080 Commits

Author SHA1 Message Date
ngie
5a54ab5e67 Integrate tools/regression/lib/libc/gen into the FreeBSD test suite
as lib/libc/tests/gen

The code in test-fnmatch that was used for generating:

- bin/sh/tests/builtins/case2.0
- bin/sh/tests/builtins/case3.0

has been left undisturbed. The target `make sh-tests` has been moved over
from tools/regression/lib/libc/gen/Makefile to
lib/libc/tests/gen/Makefile and made into a PHONY target

case2.0 and case3.0 test input generation isn't being done automatically.
This needs additional discussion.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-09 06:24:11 +00:00
ngie
d0245e5732 Fix some TAP -> ATF conversion errors
- Remove a leftover printf from when this was a TAP based testcase
- Catch mmap failures properly

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-09 06:16:38 +00:00
ngie
28aa496e2e Integrate tools/regression/lib/libc/net into the FreeBSD test suite
as lib/libc/tests/net

Also, fix eui64_aton_test:test_str(..). The test was comparing the result
of eui64_aton to a pointer of the expected result.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 23:06:40 +00:00
ngie
2ce1ab4ad6 Delete leftover printfs from when these were TAP tests
MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division
2015-11-08 21:57:35 +00:00
ngie
9367721dc3 Convert print_positional_test over to ATF
Somehow missed in r290537

X-MFC with: r290537
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 21:38:46 +00:00
ache
2c458eb4a3 Reorganize code to elimitate one _sseek() call for append modes.
MFC after:      1 week
2015-11-08 18:00:44 +00:00
ngie
bfeca53302 printfloat_test and scanfloat_test need symbols from msun; these are automatically
provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386
tinderbox

Pointyhat to: ngie
MFC after: 1 week
X-MFC with: r290538
Sponsored by: EMC / Isilon Storage Division
2015-11-08 08:27:51 +00:00
ngie
a91204eb04 Integrate tools/regression/lib/libc/string into the FreeBSD test suite
as lib/libc/tests/string

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 07:53:31 +00:00
ngie
8f1d682970 Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite
as lib/libc/tests/stdlib

- Make the code a bit more style(9) compliant
- Convert a sizeof(x)/sizeof(x[0]) to nitems

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 07:03:17 +00:00
ngie
8ae95d701f Integrate tools/regression/lib/libc/stdio into the FreeBSD test suite
as lib/libc/tests/stdio

- Fix some whitespace
- Convert the testcases to ATF
- Convert "/dev/null" to _PATH_DEVNULL

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 06:37:50 +00:00
ngie
939dcf844e Integrate tools/regression/lib/libc/locale into the FreeBSD test suite
as lib/libc/tests/locale

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-08 02:06:17 +00:00
bapt
41e30bab0f Merge from head r290483 2015-11-07 11:02:33 +00:00
smh
9637753d1a Correct posix_openpt reference in pty(3)
MFC after:	1 week
Sponsored by:	Multiplay
2015-11-06 12:02:24 +00:00
brooks
e9603d115f Revert r290298. Per discussion on tech-userlevel@netbsd.org this change
was incorrect.
2015-11-05 17:00:38 +00:00
rodrigc
4be43f5e57 Fix spelling error.
Reported by: junovitch
2015-11-05 01:54:38 +00:00
rodrigc
08ddd4f6e9 Add README, similar to the one from libnetbsd. 2015-11-05 01:29:48 +00:00
rodrigc
717c0f37f2 Import imsg from OpenBSD's libutil.
imsg provides functions for communication between processes
using sockets.  imsg is used by programs in OpenBSD such as ypldap.
2015-11-04 23:52:19 +00:00
rodrigc
cdebd14937 Rename libohash to libopenbsd.
libopenbsd is an internal library which
to bring in compatibility stuff from OpenBSD.
This will allow us to bring in more
OpenBSD utilities into the FreeBSD base system.

We similarly use libnetbsd for bringing in stuff from NetBSD.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D4078
2015-11-04 07:20:55 +00:00
hrs
b687b6568b sdl->sdl_len in sockaddr_dl can be longer than
sizeof(struct sockaddr_dl).
2015-11-03 00:46:06 +00:00
bapt
7edeed0f0f Fix mbtowc not setting EILSEQ on an Incomplete multibyte sequence for eucJP encoding 2015-11-02 22:56:24 +00:00
brooks
ac99afcf96 The ops EL_SIGNAL, EL_EDITMODE, EL_UNBUFFERED, and EL_PREP_TERM all take
an int, not an int*.

Sponsored by:	DARPA, AFRL
Discovered with:	CHERI
Differential Revision:	https://reviews.freebsd.org/D4071
2015-11-02 22:21:02 +00:00
dteske
831a12db4e Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi) 2015-11-02 20:03:59 +00:00
ngie
64d32092f6 Add _test suffix to multiple tests in lib/libc to conform to the design noted
in the FreeBSD Test Suite wiki

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:29:01 +00:00
ngie
9ec97b4e1e Remove unused variable (SRCDIR)
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:23:04 +00:00
ngie
f0f16665a9 Remove unnecessary if (x) tests before calling free(x); free(3)
already employs this check

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:22:06 +00:00
bapt
1477bec6db Merge from head 2015-11-01 21:17:38 +00:00
bapt
e29f1d2f89 locales: Fix eucJP sorting (broken upstream?)
Sorting eucJP text with "sort" resulted in an illegal sequence while
"gsort" worked.  This was traced back to mbrtowc handling which was
broken for eucJP (probably eucCN, eucKR, and eucTW as well).  This
small fix took hours to figure out.  The OR operation to build the
wide character requires an unsigned character to work correctly.  The
euc wcrtowc conversion is probably broken upstream in Illumos as well.

Triggered by: misc/freebsd-doc-ja in ports (encoded in eucJP)

Submitted by:	marino
Obtained from:	DragonflyBSD
2015-11-01 21:02:30 +00:00
bapt
8abd49c1b5 libc: Fix (and improve) nl_langinfo (CODESET)
The output of "locale charmap" is identical to the result of
nl_langinfo (CODESET) for any given locale.  The logic for returning the
codeset was very simplistic.  It just returned portion of the locale name
after the period (e.g. en_FR.ISO8859-1 returned "ISO8859-1").

When softlinks were added to locales, this broke.  e.g.:
   en_US returned ""
   en_FR.UTF8 returned "UTF8"
   en_FR.UTF-8 returned "UTF-8"
   zh_Hant_HK.Big5HKSCS returned "Big5HKSCS"
   zh_Hant_TW.Big5 returned "Big5"
   es_ES@euro returned ""

In order to fix this properly, the named locale cannot be used to
determine the encoding.  This information was almost available in the
rune data.  Unfortunately, all the single byte encodings were listed
as "NONE" encoding.

So I adjusted localedef tool to provide more information about the
encoding.  For example, instead of "NONE", the LC_CTYPE used by
fr_FR.ISO8859-15 is now encoded as "NONE:ISO8859-15".  The locale
handlers now check if the first four characters of the encoding is
"NONE" and if so, treats it as a single-byte encoding.

The nl_langinfo handling of CODESET was adjusting accordingly.  Now the
following is returned:
   en_US returns "ISO8859-1"
   fr_FR.UTF8 returns "UTF-8"
   fr_FR.UTF-8 returns "UTF-8"
   zh_Hant_HK.Big5HKSCS returns "Big5"
   zh_Hant_TW.Big5 returns "Big5"
   es_ES@euro returns "ISO8859-15"

as before, "C" and "POSIX" locales return "US-ASCII".  This is a big
improvement.  The result of nl_langinfo can never be a zero-length
string and it will always exclusively one of the values of the
character maps of /usr/src/tools/tools/locale/etc/final-maps.

Submitted by:	marino
Obtained from:	DragonflyBSD
2015-11-01 12:00:55 +00:00
ache
1f0f2b0908 Microoptimize. 2015-11-01 08:40:15 +00:00
ache
135d0338a0 Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

PR:     204156
MFC after:      1 week
2015-11-01 06:47:05 +00:00
ache
1b3f07327e Don't seek to the end if write buffer is empty (in append modes).
PR:             204156
MFC after:      1 week
2015-11-01 06:15:14 +00:00
andrew
eabb88fc2a We have long double on arm64, and the tests pass so enable them.
Sponsored by:	ABT Systems Ltd
2015-10-31 10:16:44 +00:00
sbruno
7638b73597 Not all targets support by clang have a tested or enabled ubsan yet.
Only enable h_raw on x86 targets for today so that a buildworld runs to
completion for clang enabled targets that are not x86.  This should be
removed when validation of the sanitizer has occured for all targets
supported by FreeBSD and clang.
2015-10-30 17:05:52 +00:00
ngie
24409c318d Disable h_raw/h_read with gcc
I forgot that these testcases fail with gcc 4.2.1; add a note to that effect

MFC after: never
Sponsored by: EMC / Isilon Storage Division
2015-10-30 08:06:24 +00:00
ngie
968dafb4fc - Re-enable h_raw with clang 3.7.0+
- Fix the compiler check to allow the test to be compiled for gcc

PR: 196430
MFC after: never
Sponsored by: EMC / Isilon Storage Division
2015-10-30 07:48:03 +00:00
ngie
f3fcd33bc7 Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-10-30 05:50:05 +00:00
ngie
a51ea2d92e Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc

This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-10-30 03:28:00 +00:00
bdrewery
cfb3b1e0f6 Use memmove(3) to avoid overlapping copy.
Reported by:	valgrind
MFC after:	2 weeks
X-MFC-With:	r290168
2015-10-29 23:06:33 +00:00
bdrewery
78af08e72a Fix several memory leaks, and crashes, in iconvlist(3).
- Both curitem and curitem (via the names list) was always leaked.
- malloc(3) failures lead to some leaks.
- __bsd___iconv_get_list() failure lead to a crash since its error was not
  handles and __bsd___iconv_free_list() is not NULL-safe.

I have slightly refactored this to avoid extra malloc and free logic in cases
of malloc(3) failing.

There are still bad assumptions here that I did not deal with.  One of which is
that the data will always have a '/' so the strchr(3) will not return NULL.

Coverity CID:	1130055 1130054 1130053
2015-10-29 23:02:34 +00:00
ache
64dac23af8 Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.

MFC after:      3 weeks
2015-10-28 14:40:02 +00:00
bapt
1db684f7ee Update libucl to latest git snapshot (20151027) 2015-10-27 21:24:09 +00:00
jilles
2de62537c0 libedit: Use correct buffer lengths in vi mode v command.
Libedit's vi mode provides a v command to edit the current line in vi(1)
(hard-coded to vi, in fact).

When Unicode/wide character mode was added, this command started truncating
and/or corrupting the edited text.

This commit fixes v if the text fits into the buffer. If the text is longer,
it is truncated.

PR:		203743
Obtained from:	NetBSD (originally submitted by me)
2015-10-27 21:16:29 +00:00
ache
f3a60ddeab According to POSIX, a write operation shall start at the current size of
the stream (if mode had 'a' as the first character).

MFC after:      1 week
2015-10-25 12:09:28 +00:00
ngie
5ed05b2c9b Fix compiling with gcc [4.2.1] after r287797 when MK_HESOID == no and
MK_NIS == no by converting `i` back to an int, and instead cast the loop
comparison to `int`

The loop comparison is iterating the len(ns_dtab)-1, because
the last element is the sentinel tuple { NULL, NULL, NULL, }, so when
both HESOID and NIS are off, len(ns_dtab)-1 == 1 - 1 == 0, and the loop
is skipped because the expression is tautologically false

While here, convert `(sizeof(x) / sizeof(x[0]))` to `nitems(x)`

Tested with: clang 3.7.0, gcc 4.2.1, and gcc 4.9.4 [*] with MK_NIS={no,yes}
             and by running bash -lc 'id -u && id -g && id'

* gcc 4.9.4 needs another patch in order for the compile to succeed
  with -Werror with lib/libc/gen/getgrent.c

Reported by: jhibbits
2015-10-25 07:42:56 +00:00
ache
d6852ac6f1 Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().

MFC after:      3 weeks
2015-10-24 02:23:15 +00:00
bapt
ffec40a708 collate: Fix expansion substitions (broken upstream too)
Through testing, the user noted that some Cyrillic characters were not
sorting correctly, and this was confirmed.

After extensive testing and review, the localedef tool was eliminated
as the culprit.  The sustitutions were encoded correctly in LC_COLLATE.

The error was mainly in wcscoll where character expansions were
mishandled.  The main directive pass routines had to be written to
go back for a new collation value when the "state" variable was set.
Before pointers were being advanced, the second lookup was gettting
applied to the wrong character, etc.

The "eat expansion codes" section on collate.c also had a bug.  Later
own, the "state" variable logic was changed to only set if next
code was greater than zero (rather than >= 0).

Some additional cleanups got captured from previous work:
1) The previous commit moved the binary search comment from the
   correct location to a wrong location because it's wrong upstream
   in Illumos.  The comment has little value so I just removed it.
2) Don't check if pointers are null before freeing, this is
   redundant as free() handles null pointers.
3) The two binary search trees were standardized wrt initialization
4) On the binary search trees, a negative "high" exits rather than
   checking the table count again.

Submitted by:	marino
Obtained from:	DragonflyBSD
2015-10-23 23:24:03 +00:00
vangyzen
e32b5663ec resolver: abuse _res a little less
In the past, _res was a global variable.  Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.

Fix those callers to store the result of _res in a local variable.

Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred.  Thanks to jilles
for noticing this.

Reviewed by:	jilles
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D3887
2015-10-23 15:56:17 +00:00
dteske
ed46ed587a figpar(3) merged to stable/10 before release/10.2.0
MFC after:	3 days
X-MFC-to:	stable/10
2015-10-23 07:37:27 +00:00
dteske
57bd88745b Bump date/copyright after correcting HISTORY
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r289790
2015-10-23 07:36:27 +00:00
dteske
3acd502432 dpv(3) merged to stable/10 before release/10.2.0
MFC after:	3 days
X-MFC-to:	stable/10
2015-10-23 07:34:57 +00:00
bapt
69d2b113da libc/collate: minor tweaks / fix
The main "fix" here is properly setting a collate loading error for each
early return.  Tweaks include removing unnecessary null checks, adding
assertions (from Illumos) and a couple of variables to reduces code
differences and improve readability.  For normal use, there are no
functional changes here.

Obtained from:	DragonflyBSD, Illumos
2015-10-22 14:29:19 +00:00
bdrewery
d66e085097 Remove more disconnected libgpib items missed in r276214.
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 03:51:25 +00:00
ngie
cb79859cfb Revert lib/libc/gen/dirname.3@r289695
This is why I use branches usually, not commit directly to head
2015-10-21 13:16:03 +00:00
ngie
91302d1c62 Revert r289694
I committed some other undesirable local changes by accident
2015-10-21 13:15:04 +00:00
cem
f7c12e6bb7 cpuset.9: Link to/from the new page
A follow-up to r289667.

Sponsored by:	EMC / Isilon Storage Division
2015-10-20 23:52:37 +00:00
jhb
6db15b38fe Switch pl_child_pid from int to pid_t.
Reviewed by:	emaste, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3857
2015-10-20 17:58:21 +00:00
bapt
d93a511528 Merge from head 2015-10-19 11:51:10 +00:00
dim
5d3b6e9a38 Switch the default OpenMP runtime for clang to libomp (from the LLVM
project), as libgomp is not supported anyway.  You can use the
devel/llvm-devel port to install a recent copy of the OpenMP runtime.
2015-10-18 17:18:19 +00:00
ngie
5c0da1966c Make libxo depend on libutil because it uses humanize_number after r287111
Remove overlinking in lib/libxo/tests, sbin/savecore, and
usr.bin/{iscsictl,wc,xo}

PR: 203673
Sponsored by: EMC / Isilon Storage Division
2015-10-18 07:30:50 +00:00
cem
bb2ba2b058 Document bitset(9) 2015-10-17 19:55:58 +00:00
bdrewery
c8894251e1 Conditionalize the META_MODE tool handling on MK_META_MODE.
It was not being used outside of META_MODE but this should make it more clear
that it is only for META_MODE.

Sponsored by:	EMC / Isilon Storage Division
2015-10-17 15:50:52 +00:00
ngie
8274c9ca5f Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a
later point in time

PR: 192671
Submitted by: Scott Ferris <scott.ferris@isilon.com>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-10-17 09:07:53 +00:00
des
095b2710ed Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls.
PR:		199801
Submitted by:	Jukka Ukkonen <jau@iki.fi>
MFC after:	1 week
2015-10-16 12:53:22 +00:00
des
7cd58b9488 Fix two bugs in HTTPS tunnelling:
- If the proxy returns a non-200 result, set the error code accordingly
   so the caller / user gets a somewhat meaningful error message.
 - Consume and discard any HTTP response header following the result line.

PR:		194483
Tested by:	Fabian Keil <fk@fabiankeil.de>
MFC after:	1 week
2015-10-16 12:21:44 +00:00
bdrewery
153205e33f Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 22:55:08 +00:00
bdrewery
2d53ea5e74 libstdc++ also snook in incorrectly in r267511, despite not being a real
subdir.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:49:20 +00:00
bdrewery
82e3ddf057 Remove unneeded libg++ reference that came in with r267511 based on a removed
comment.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:46:34 +00:00
bdrewery
39eb138e10 Fix another ++= parsed as '+=', missed in r289384.
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:40:23 +00:00
bdrewery
1746acfd5f Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
as a +=.  These were safe due to a .WAIT very early on.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:27:15 +00:00
bz
fec51f584e For the Cortex-A8 use the a8 and not the a9 events table.
MFC after:		2 weeks
Sponsored by:		DARPA/AFRL
Differential Revision:	https://reviews.freebsd.org/D3882
2015-10-14 16:56:25 +00:00
vangyzen
60458e70da resolver: automatically reload /etc/resolv.conf
On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html

Reviewed by:	kp, wblock
Discussed with:	jilles, imp, alfred
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D3867
2015-10-14 14:26:44 +00:00
bapt
cd8d4b2207 Include sys/*.h earlier
Reported by:	kib
2015-10-14 12:46:05 +00:00
bapt
979669d923 Commit log from Dragonfly:
FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never
actually implemented it.  The isnumber() function was equivalent to the
isdigit() function in every case.

Now that DragonFly's ctype source files have number definitions, the
number ctype can finally be implemented.  It's given a new flag _CTYPE_N.
The isalnum() and iswalnum() functions have been changed to use this
flag rather than the _CTYPE_D digit flag.

While isalnum(), isnumber(), and their wide equivalents now return
different values in locale cases, the ishexnumber() and iswhexnumber()
functions are unchanged.  They are still aliases for isxdigit() and
iswxdigit().

Also change ctype.h for isdigit and isxdigit to use sbistype like the
other functions.

Obtained from:	dragonfly
2015-10-13 20:43:49 +00:00
bapt
c8d6d4a785 Merge from head 2015-10-13 19:44:36 +00:00
ngie
05734f7455 Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-12 18:31:21 +00:00
ngie
dd1f618367 Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +00:00
ngie
0671442cbc Redo MFC @ r289134 2015-10-11 08:28:36 +00:00
ngie
f5532a14fe Revert r289133; retry the merge 2015-10-11 08:26:48 +00:00
ngie
33c7bf8e7b MFhead @ r289132 2015-10-11 08:21:49 +00:00
trasz
3e6041333a Change the default setting of kern.ipc.shm_allow_removed from 0 to 1.
This removes the need for manually changing this flag for Google Chrome
users. It also improves compatibility with Linux applications running under
Linuxulator compatibility layer, and possibly also helps in porting software
from Linux.

Generally speaking, the flag allows applications to create the shared memory
segment, attach it, remove it, and then continue to use it and to reattach it
later. This means that the kernel will automatically "clean up" after the
application exits.

It could be argued that it's against POSIX. However, SUSv3 says this
about IPC_RMID: "Remove the shared memory identifier specified by shmid from
the system and destroy the shared memory segment and shmid_ds data structure
associated with it." From my reading, we break it in any case by deferring
removal of the segment until it's detached; we won't break it any more
by also deferring removal of the identifier.

This is the behaviour exhibited by Linux since... probably always, and
also by OpenBSD since the following commit:

revision 1.54
date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8;
Allow segments to be used even after they were marked for deletion with
the IPC_RMID flag.
This is permitted as an extension beyond the standards and this is similar
to what other operating systems like linux do.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3603
2015-10-10 09:29:47 +00:00
ngie
8cba005f90 MFhead @ r289100 2015-10-10 01:29:50 +00:00
marcel
d1d7744157 If we can't open the file, skip devclose() for the exclusive_file_system
case. We never called devopen(), so we know there's nothing to close.
2015-10-08 17:59:05 +00:00
peter
3cab7edfb2 Move SHLIBDIR?=/lib before <src.opts.mk> so that it works again. 2015-10-08 01:17:45 +00:00
rodrigc
1bb3c00a2b Use -fpermissive if compiling with GCC.
Works around GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888
when compiling Module.cpp
2015-10-08 00:48:29 +00:00
rodrigc
7d1573f7e9 Use proper function prototypes.
Eliminates -Wstrict-prototypes warning
2015-10-07 19:55:58 +00:00
jhb
9b1033cdad Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
Reviewed by:	emaste, kib
Differential Revision:	https://reviews.freebsd.org/D3833
2015-10-07 17:52:18 +00:00
ngie
98b68926cb Integrate the testcases into the FreeBSD test suite
There are a handful of broken testcases that need to be investigated
(see BROKEN_TESTS for more details)
2015-10-07 05:20:44 +00:00
bdrewery
7c2a5d79af truss: Add support for utrace(2).
This uses the kdump(1) utrace support code directly until a common library
is created.

This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing
with LD_UTRACE=1.  Unknown utrace(2) data is just printed as hex.

PR:		43819 [inspired by]
Reviewed by:	jhb
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D3819
2015-10-06 21:58:38 +00:00
ngie
b3e8d0ae9c Forced commit to note that I was playing around with libarchive
test integration that accidentally got committed with r288955
2015-10-06 21:44:48 +00:00
ngie
a6c3db2235 MFhead @ r288954 2015-10-06 21:43:37 +00:00
dim
d71b32ab81 Stop linking libc++.so verbosely, there is no need to.
MFC after:	3 days
2015-10-06 21:28:54 +00:00
dim
4b2b2cb1c9 For llvm/clang libraries, skip including tablegen-produced .d files when
the target is "make depend".  This works around errors during
incremental make depend of some clang libraries, for example "don't know
how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td".

Reported by:	emaste
2015-10-06 19:49:53 +00:00
ngie
8cad7e1c52 MFhead @ r288943
clang 3.7.0 upgrade
2015-10-06 18:07:07 +00:00
cem
9c1e214f79 Fix core corruption caused by race in note_procstat_vmmap
This fix is spiritually similar to r287442 and was discovered thanks to
the KASSERT added in that revision.

NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' vm map
via vn_fullpath.  As vnodes may move during coredump, this is racy.

We do not remove the race, only prevent it from causing coredump
corruption.

- Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable
  kinfo packing for PROCSTAT_VMMAP notes.  This avoids VMMAP corruption
  and truncation, even if names change, at the cost of up to PATH_MAX
  bytes per mapped object.  The new sysctl is documented in core.5.

- Fix note_procstat_vmmap to self-limit in the second pass.  This
  addresses corruption, at the cost of sometimes producing a truncated
  result.

- Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste)
  to grok the new zero padding.

Reported by:	pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt)
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3824
2015-10-06 18:07:00 +00:00
dim
a6f4f28b54 Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help.

Exp-run:	antoine
Relnotes:	yes
2015-10-06 17:53:29 +00:00
ngie
df47d8ed8d ------------------------------------------------------------------------
r288932 | ngie | 2015-10-06 10:15:07 -0700 (Tue, 06 Oct 2015) | 9 lines

Refactor the test/ Makefiles per recent changes to bsd.test.mk and
netbsd-tests.test.mk

- Eliminate explicit SRCTOP setting
- Eliminate explicit OBJ
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

------------------------------------------------------------------------
2015-10-06 17:46:48 +00:00
ngie
ec4808a9a6 Add directory for test encoder missed by accident in r288929
Sponsored by: EMC / Isilon Storage Division
2015-10-06 17:22:54 +00:00
ngie
ec96fc8eab Remove a comment from an earlier iteration of trying to figure out how the
test encoder testcases worked
2015-10-06 17:18:15 +00:00
ngie
f580580139 Integrate the tests from libxo into the FreeBSD test suite
The functional_test.sh harness for each test subdir was inspired
by the version in bin/sh/tests/functional_test.sh

Some gymnastics were required to deal with implicit rules for
.c / .o -> .out as the suffix transformation rules were
incorrectly trying to create the test outputs from some of the
source files

Sponsored by: EMC / Isilon Storage Division
2015-10-06 16:58:47 +00:00
dim
f199489134 Merge ^/head r288836 through r288925. 2015-10-06 16:25:13 +00:00
ngie
f61b60624c Use LIBXOSRC instead of LIBXO when defining the path to contrib/libxo
The latter is already defined in bsd.libnames.mk, so avoid the conflict
in case someone copy-pastes make variables

While here, switch path to the top of the source tree with SRCTOP
2015-10-06 07:28:54 +00:00
dim
24ac568077 Merge ^/head r288831 through r288835. 2015-10-05 20:08:11 +00:00
jgh
2fd2750b54 - address grammar
PR:		203440 (based on)
Submitted by:	ceratv@rpi.edu
Approved by:	wblock@ (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3813
2015-10-05 18:09:43 +00:00
dim
1b28caab43 Merge ^/head r288457 through r288830. 2015-10-05 17:54:54 +00:00
dim
d463dc0074 Add std::uncaught_exceptions() to libcxxrt (C++17, see N4152 and N4259).
This has also been submitted upstream.
2015-10-05 17:47:23 +00:00
markj
d6b5b38ff0 Revert r288628 and instead fix a discrepancy between the posix_fadvise(2)
man page and POSIX: posix_fadvise(2) returns an error number on failure.

Reported by:	jilles
MFC after:	1 week
2015-10-03 22:27:14 +00:00
bdrewery
c4aef72c06 Include stddef.h for ptrdiff_t 2015-10-03 20:06:50 +00:00
bdrewery
62a263e3d1 Remove redundant COMPAT_32BIT guard on pkgconfig files. This is already handled
by the LIBRARIES_ONLY mechanism protecting FILES.

Sponsored by:	EMC / Isilon Storage Division
2015-10-03 16:34:21 +00:00
hrs
a14f7a3926 - Move PF_LOCAL at the end of the array. PF_INET{,6} is used more often.
- Add SOCKTYPE_ANY to PF_LOCAL.

- Apply AI_CANONNAME to only AF_INET{,6}.  It is not meaningful for the
  other AFs.
2015-10-03 12:40:54 +00:00
dim
c88ca1c406 Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
jilles
aca221db9d wordexp: Rewrite to make WRDE_NOCMD reliable.
Shell syntax is too complicated to detect command substitution and unquoted
operators reliably without implementing much of sh's parser. Therefore, have
sh do this detection.

While changing sh's support anyway, also read input from a pipe instead of
arguments to avoid {ARG_MAX} limits and improve privacy, and output count
and length using 16 instead of 8 digits.

The basic concept is:
execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2",
    "", flags & WRDE_NOCMD ? "-p" : "", <pipe with words>);

The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to
fail strings containing unquoted braces with code WRDE_BADCHAR. Since this
is normally not a syntax error in sh, there is still a need for checking
code in libc, we_check().

The new we_check() is an optimistic check that all the characters
  <newline> | & ; < > ( ) { }
are quoted. To avoid duplicating too much sh logic, such characters are
permitted when quoting characters are seen, even if the quoting characters
may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad
characters that get past it and are a syntax error in sh return WRDE_SYNTAX.

Although many implementations of WRDE_NOCMD erroneously allow some command
substitutions (and ours even documented this), there appears to be code that
relies on its security (codesearch.debian.net shows quite a few uses).
Passing untrusted data to wordexp() still exposes a denial of service
possibility and a fairly large attack surface.

Reviewed by:	wblock (man page only)
MFC after:	2 weeks
Relnotes:	yes
Security:	fixes command execution with wordexp(untrusted, WRDE_NOCMD)
2015-09-30 21:32:29 +00:00
bdrewery
7d7e4c43c4 Fix 'ugidfw remove' after r284251 incorrectly changed it.
The sysctl_rule() node removes entries when given a newptr and newlen == 0.
2015-09-29 18:48:12 +00:00
delphij
e8d1e1d737 In this context fclose() can never fail, so assert it in the test
case.
2015-09-29 17:54:28 +00:00
kib
2b6ac44d5d Annotate arm userspace assembler sources stating their tolerance to
the non-executable stack.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-09-29 16:09:58 +00:00
delphij
14220da890 Use calloc() instead of malloc + memset.
MFC after:	2 weeks
2015-09-29 04:47:31 +00:00
jilles
9ee3062174 fnmatch(): Remove exponential behaviour as in sh r229201.
The old code was exponential in the number of asterisks in the pattern.
However, once a match has been found upto the next asterisk, the previous
asterisks are no longer relevant.
2015-09-27 12:52:18 +00:00
bdrewery
3513be48c0 Add missing CLEANFILES.
MFC after:	1 week
X-MFC-With:	r288199
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 01:04:52 +00:00
bdrewery
459799dc3d META_MODE: Remove DEP_MACHINE from Makefile.depend files.
This has not been needed since r246865 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:44:01 +00:00
bdrewery
f37faa57f7 META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:26:08 +00:00
grembo
adca4f81cb Fix non-POSIX-compliant use of getaddrinfo in libfetch
Submitted by:	Boris Kolpackov <boris@codesynthesis.com>
Reviewed by:	bapt
Approved by:	bapt
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3724
2015-09-25 14:24:23 +00:00
bdrewery
71fccfc30f Add missing CLEANFILES.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 23:15:24 +00:00
dim
5c80b18763 Merge ^/head r288126 through r288196. 2015-09-24 21:48:04 +00:00
dim
86e5497c67 Revert r286421, now that the fix for LLVM PR24343 is in. 2015-09-24 21:39:31 +00:00
rodrigc
57dcec656d Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Submitted by:   Sascha Wildner <swildner@dragonflybsd.org>
Obtained from:  DragonFlyBSD (commit 5d7d35b17f98588c39b30036f1a3fe8802935c2c)
2015-09-23 16:16:16 +00:00
delphij
34650d7da6 MFV r288140: update file to 5.25.
MFC after:	1 month
2015-09-23 05:39:20 +00:00
dim
b905d18716 Merge ^/head r288100 through r288125. 2015-09-22 20:32:49 +00:00
rodrigc
aa2db6bfb4 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-22 15:57:26 +00:00
rodrigc
5200f4be66 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-22 15:40:07 +00:00
dim
3715394e84 Merge ^/head r288035 through r288099. 2015-09-22 09:50:11 +00:00
rodrigc
ff5d08b031 Use proper function prototype for readdir().
Eliminates -Wstrict-prototypes warning

Submitted by: Joerg Sonnenberger <joerg@dragonflybsd.org>
Obtained from: DragonFlyBSD (commit 2a6aec8dab58c89961cabcfdb92e0d0ae256dea4)
2015-09-22 07:40:55 +00:00
rodrigc
dc4550e7b2 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-22 07:31:40 +00:00
bdrewery
3faab6f866 Avoid adding duplicates into OBJS. bsd.lib.mk already handles adding
entries to OBJS based on SRCS.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 04:55:28 +00:00
bdrewery
22c9fba62b Fix installation of 32bit libraries after r288074.
FILES is not used when LIBRARIES_ONLY is set, which is used to build and
install the lib32 sysroot.  All of the csu files do quality as "libraries"
for this case so just undefine LIBRARIES_ONLY.

This is still better than the previous realinstall handling as it does
not hook into META_MODE properly.

Sponsored by:	EMC / Isilon Storage Division
2015-09-21 21:44:02 +00:00
bdrewery
3cec2c22f8 Replace realinstall: and META_MODE staging hacks with FILES mechanism.
This partially reverts r270170 for lib/csu/i386 while retaining the
change for using bsd.lib.mk.

These FILES groups could go into lib/csu/Makefile.inc but I've kept them
in the Makefiles for clarity.

Sponsored by:	EMC / Isilon Storage Division
2015-09-21 18:39:13 +00:00
des
ea85485818 Restore the upstream (and documented) behavior of searching for modules
both in /usr/lib and /usr/local/lib, thus simplifying the use of modules
from ports, without breaking the compat32 case again.

PR:		191151
MFC after:	3 weeks
2015-09-21 17:26:35 +00:00
dim
a98b889039 Don't install Intrin.h, as this is an intrinsics header for Windows. 2015-09-20 21:39:55 +00:00
rodrigc
6e42fc823f Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 21:21:17 +00:00
rodrigc
4dfb6c3572 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 21:21:01 +00:00
rodrigc
70a6c8c892 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:55:00 +00:00
rodrigc
0cbe54eb2d Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:53:24 +00:00
rodrigc
215fea0400 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:52:13 +00:00
rodrigc
ce886a6233 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:51:52 +00:00
rodrigc
a9a0375d7e Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:50:56 +00:00
rodrigc
aa990038b1 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:50:18 +00:00
dim
18b14b4a2f Merge ^/head r287878 through r288034. 2015-09-20 20:34:17 +00:00
rodrigc
e5a64a53e6 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:28:49 +00:00
rodrigc
a60b0abd9a Remove names from some prototypes 2015-09-20 20:27:57 +00:00
rodrigc
141020ed04 Remove names from some prototypes 2015-09-20 20:26:46 +00:00
rodrigc
5919af45fe Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:24:28 +00:00
rodrigc
74c1506b33 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:23:16 +00:00
rodrigc
424fc070ef Remove names from some prototypes 2015-09-20 20:21:49 +00:00
rodrigc
e23bf826df Remove names from some prototypes 2015-09-20 20:16:34 +00:00
rodrigc
1737b90d79 Remove names from prototypes 2015-09-20 20:15:44 +00:00
rodrigc
fbd3bd1bfb Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
rodrigc
0cd26f001a Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:26:55 +00:00
rodrigc
8c6e2102df Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
2015-09-20 04:23:16 +00:00
rodrigc
101e50ce2f Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 04:21:44 +00:00
rodrigc
f7aca4b673 Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings. 2015-09-20 04:20:31 +00:00
rodrigc
5289640ead Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:17:53 +00:00
rodrigc
fd3fe449bf Define _NS_PRIVATE to make declarations visible.
This eliminates -Wmissing-prototypes warnings.
2015-09-20 04:17:03 +00:00
rodrigc
587e2d1829 Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 04:15:37 +00:00
rodrigc
a584fc06f1 Adding missing declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:06:55 +00:00
rodrigc
07e3f06934 Add missing include to eliminate -Wmissing-prototypes warning 2015-09-20 04:06:04 +00:00
rodrigc
177f72974d Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 03:59:27 +00:00
rodrigc
49c1e7af60 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:58:27 +00:00
rodrigc
4c66a735a8 Adding missing include to eliminate -Wmissing-prototypes warning 2015-09-20 03:56:57 +00:00
rodrigc
0fd58af262 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:55:03 +00:00
rodrigc
08c0b3cae7 Add declarations to eliminate -Wmissing-prototypes warnings. 2015-09-20 03:53:08 +00:00
rodrigc
0046fafdb2 Add declaration to eliminate -Wmissing-prototypes warning. 2015-09-20 03:51:15 +00:00
rodrigc
418ac8aebe Add missing include to eliminate -Wmissing-prototypes warnings 2015-09-20 03:49:08 +00:00
rodrigc
04f98ba6e2 Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 03:45:57 +00:00
hrs
a3fcca6713 Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):
- In a PF_LOCAL address, "hostname" must begins with '/' and "servname"
  is always NULL.  All of ai_flags are ignored.

- PF_UNSPEC matches PF_LOCAL.  EAI_SERVICE is not returned to make
  AF-independent programming easier; "servname" is always ignored
  in PF_LOCAL.  In practice, PF_INET* and PF_LOCAL are
  mutually-exclusive because a hostname which begins with '/' is invalid
  in PF_INET*.  No domain name resolution is performed for a PF_LOCAL address.

Differential Revision:	https://reviews.freebsd.org/D3634
2015-09-20 01:09:23 +00:00
jilles
b76aba5008 libc: Consistently call _ioctl() internally, not ioctl(). 2015-09-19 20:27:09 +00:00
bdrewery
deb97713e0 Replace beforeinstall: handling with FILES.
This actually fixes some cases to respect LIBRARIES_ONLY.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 23:49:32 +00:00
delphij
76fb979246 There is no HP 300 support in FreeBSD anymore, so remove the obsolete
BUGS section.

While I'm there also bump Dd date.

MFC after:	2 weeks
2015-09-18 20:28:37 +00:00
trasz
bd8e12dd02 Kernel part of reroot support - a way to change rootfs without reboot.
Note that the mountlist manipulations are somewhat fragile, and not very
pretty.  The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly.  It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2698
2015-09-18 17:32:22 +00:00
des
c5050a3b9f Upgrade to Unbound 1.5.4. 2015-09-17 16:10:11 +00:00
bdrewery
bdebc05d94 Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
dim
7b8be09912 Merge ^/head r287680 through r287877. 2015-09-16 22:35:59 +00:00
dim
ea5248cdc1 Update libc++ to 3.7.0 release. 2015-09-16 22:26:52 +00:00
rodrigc
da6ab8d992 Use unsigned variables in a few places.
Eliminates gcc 4.9 warnings.
2015-09-14 18:59:01 +00:00
rodrigc
03b17210ed Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
2015-09-14 18:44:13 +00:00
jilles
5f1339c5cc db/recno: Open with close-on-exec like btree and hash do. 2015-09-13 17:17:52 +00:00
jilles
036f5d34b6 setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD). 2015-09-13 14:00:49 +00:00
dim
5cc32d7f18 Merge ^/head r287527 through r287679. 2015-09-11 17:20:03 +00:00
markj
34116761ff Remove the v_cache_min and v_cache_max sysctls. They are unused and have
no effect.

Reviewed by:	alc
Sponsored by:	EMC / Isilon Storage Division
2015-09-11 03:00:24 +00:00
dim
a8fd1565ce Amend 287626 by adding lib/libclang_rt/safestack. 2015-09-10 20:37:00 +00:00
dim
27c642b88f Update compiler-rt to 3.7.0 release. This also includes the sanitizer
and profile libraries.
2015-09-10 20:35:47 +00:00
tuexen
9701f78cf8 Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR:		166483
Discussed with:	eadler@
MFC after:	4 weeks
2015-09-10 10:23:23 +00:00
hrs
0e29b6e367 - Fix SIGSEGV when sa == NULL. NULL check in getnameinfo_inet()
did not work as expected.

- Simplify afdl table lookup.

MFC after:	3 days
2015-09-09 09:19:07 +00:00
andrew
a04f5ff10f Enable mincore_test on arm64, we now have a working pmap_mincore.
PR:		202307
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2015-09-08 18:44:12 +00:00
trasz
ca187714e1 Make it possible to use acl_create_entry_np(3) to use first entry to an
empty ACL, and to append an entry to an ACL.

Submitted by:	sef@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-08 14:52:14 +00:00
kib
b522c482ce Style. Use ANSI definition, wrap long lines, no initialization in
declaration for locals.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-08 08:48:53 +00:00
kib
36ed4c2481 In the pthread_once(), if the initializer has already run, then the
calling thread is supposed to see accesses issued by the initializer.
This means that the read of the once_control->state variable should
have an acquire semantic.  Use atomic_thread_fence_acq() when the
value read is ONCE_DONE, instead of straightforward atomic_load_acq(),
to only put a barrier when needed (*).

On the other hand, the updates of the once_control->state with the
intermediate progress state do not need to synchronize with other
state accesses, remove _acq suffix.

Reviewed by:	alc (previous version)
Suggested by:	alc (*)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-08 08:41:07 +00:00
dim
0d218be831 In libz's inflateMark(), avoid left-shifting a negative integer, which
is undefined.

Reviewed by:	delphij
Differential Revision: https://reviews.freebsd.org/D3344
MFC after:	3 days
2015-09-07 20:55:14 +00:00
dim
fe6d24a2c1 Minimize the number of files compiled for clang only (e.g. when neither
WITH_CLANG_EXTRAS nor WITH_LLDB is in effect).
2015-09-06 22:02:13 +00:00
dim
1e1e44a4f0 Update llvm, clang and lldb to 3.7.0 release. 2015-09-06 19:58:48 +00:00
dim
50ffe587e0 Import libc++ 3.7.0 release (r246257). 2015-09-06 18:46:46 +00:00
dim
3da1400d07 Import compiler-rt 3.7.0 release (r246257). 2015-09-06 18:41:23 +00:00
dim
4238dc458e Import clang 3.7.0 release (r246257). 2015-09-06 18:36:24 +00:00