summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFC r275163: ANSIfy b64_ptonemaste2015-03-231-4/+1
|
* MFC r275060: Fix b64_pton output buffer overrun test for exact-sized bufferemaste2015-03-231-7/+15
| | | | | b64_pton would sometimes erroneously fail to decode a base64 string into a precisely sized buffer. The overflow check was a little too greedy.
* MFC r277948:pfg2015-03-231-22/+4
| | | | | | | | | msun: use previously ignored "in" value. This fixes evaluation of exceptional values in scalblnl(). While here, simplify the code as suggested by Bruce Evans. Reported by: clang static analyzer
* MFC r279037:pfg2015-03-231-4/+2
| | | | | | | | | | | | | dbm_delete(3): correct man page to match current behaviour. "The dbm_store() and dbm_delete() functions shall return 0 when they succeed and a negative value when they fail." Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html PR: 42422 Suggested by: delphij
* MFC r279186:pfg2015-03-232-20/+47
| | | | | | | | | | | setmode(3): Make sure that setmode sets errno on failure. Our man page already documented this partially but now we provide more consistent behavior. PR: 136669 Obtained from: NetBSD (CVS rev. 1.31, 1.33) Relnotes: yes
* Merge an applicable subset of r263234 from HEAD to stable/10:rwatson2015-03-192-2/+2
| | | | | | | | | | | | | Update most userspace consumers of capability.h to use capsicum.h instead. auditdistd is not updated as I will make the change upstream and then do a vendor import sometime in the next week or two. Note that a significant fraction does not apply, as FreeBSD 10 doesn't contain a Capsicumised ping, casperd, libcasper, etc. When these features are merged, the capsicum.h change will need to be merged with them. Sponsored by: Google, Inc.
* Merge r263842 from HEAD to stable/10:rwatson2015-03-197-14/+15
| | | | | | Update system man pages for s/capability.h/capsicum.h/. Sponsored by: Google, Inc.
* MFC r279326:kib2015-03-051-1/+1
| | | | Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
* MFC r279318:kib2015-03-051-1/+2
| | | | | Check that the pointer to the thread return value is not NULL before dereferencing. NULL is allowed by C11 and must be handled.
* MFC r279284:kib2015-03-041-3/+4
| | | | Propagate errors from _thr_umutex_unlock2 through mutex_unlock_common.
* MFC r279346:ken2015-03-021-21/+3
| | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r279346 | ken | 2015-02-26 19:44:12 -0700 (Thu, 26 Feb 2015) | 13 lines Remove an obsolete comment in devstat(3) about the accuracy of the milliseconds per transaction (DSM_MS_PER_TRANSACTION) calculation. The comment was accurate many years ago when the kernel didn't record I/O times on a per-I/O basis, but now that we do collect that information in most areas, it isn't correct. The milliseconds per transaction values are correct, assuming the I/O duration has been recorded. Sponsored by: Spectra Logic ------------------------------------------------------------------------
* MFC r279367:kib2015-03-021-1/+1
| | | | Fix typo.
* MFC r278193:ngie2015-03-011-1/+5
| | | | | | Add MK_FILE to control whether or not to build file(1), libmagic(3), etc Sponsored by: EMC / Isilon Storage Division
* MFC: r278870marius2015-02-243-4/+11
| | | | | | | | Unbreak sparc64 after r276630 (MFCed to stable/10 in r277317) by calling __sparc_sigtramp_setup signal trampoline as part of the MD __sys_sigaction again. Submitted by: kib (initial versions)
* MFC r278803, r278905:pfg2015-02-221-5/+7
| | | | | | | | | | | | | | | | ulimit(3): Fix broken check. The existing implementation had a broken comparison that could overflow and return confusing values. Replace this with a check that avoids the overflow before it happens. Consistently return a maximum value also on the case of negative arguments since negative is considered an overflow and means infinity for our current setrlimit(). New revamped version is credited to Bruce Evans. CID: 1199295
* MFC r278658:rpaulo2015-02-201-3/+18
| | | | Teach libproc how to find debugging symbols in /usr/lib/debug.
* MFC r278311: Some NetGraph debug polishing.mav2015-02-201-7/+22
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r278889:kib2015-02-201-1/+1
| | | | Restore the extern qualifier on __cleanup.
* MFC r278301, r278315:pfg2015-02-191-4/+5
| | | | | | | tdelete(3): don't delete the node we are about to return. CID: 272528 Obtained from: NetBSD (CVS rev. 1.4)
* MFC r278300, r278314:pfg2015-02-191-8/+15
| | | | | | | | | | | getdiskbyname(): plug resource leak Variable cq going out of scope leaks the storage it points to. CID: 270511 Phabric: D1775 Reviewed by: imp Obtained from: NetBSD (CVS rev. 1.34)
* MFC r278627:kib2015-02-191-31/+11
| | | | Update libthr(3) man page to reflect the work done to support dlopen.
* MFC r278739:delphij2015-02-171-0/+17
| | | | | | | | Disallow pattern spaces which would cause intermediate calculations to overflow size_t. Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon) Security: CERT VU#695940
* MFC r278751:kib2015-02-176-30/+34
| | | | Properly interpose libc spinlocks, was missed in r276630.
* Synchronize the default C++ stack in stable/10 with head, by mergingdim2015-02-132-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost all recent changes to libc++ and libcxxrt. MFC r256642: Since C++ typeinfo objects are currently not guaranteed to be merged at runtime by the dynamic linker, check for their equality in libcxxrt by not only comparing the typeinfo's name pointers, but also comparing the full names, if necessary. (This is similar to what GNU libstdc++ does in its default configuration.) The 'deep' check can be turned off again by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt. Reviewed by: theraven MFC r270522 (by rdivacky): The standard we compile libc++ with is called c++11 not c++0x. MFC r273066 (by bapt): Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r273382 (by bapt): Fix build by marking the new functions as weak This is a temporary fix MFC r273407 (by bapt): When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy its links dependencies in the least hackish way. Please note that this hacky libstds++ never get installed on the final system Reviewed by: imp MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 MFC r277217: Import libc++ trunk r224926. This fixes a number of bugs, completes C++14 support[1], adds more C++1z features[2], and fixes the following LWG issues[3]: 1450: Contradiction in regex_constants 2003: String exception inconsistency in erase. 2075: Progress guarantees, lock-free property, and scheduling assumptions 2104: unique_lock move-assignment should not be noexcept 2112: User-defined classes that cannot be derived from 2132: std::function ambiguity 2135: Unclear requirement for exceptions thrown in condition_variable::wait() 2142: packaged_task::operator() synchronization too broad? 2182: Container::[const_]reference types are misleadingly specified 2186: Incomplete action on async/launch::deferred 2188: Reverse iterator does not fully support targets that overload operator& 2193: Default constructors for standard library containers are explicit 2205: Problematic postconditions of regex_match and regex_search 2213: Return value of std::regex_replace 2240: Probable misuse of term "function scope" in [thread.condition] 2252: Strong guarantee on vector::push_back() still broken with C++11? 2257: Simplify container requirements with the new algorithms 2258: a.erase(q1, q2) unable to directly return q2 2263: Comparing iterators and allocator pointers with different const-character 2268: Setting a default argument in the declaration of a member function assign of std::basic_string 2271: regex_traits::lookup_classname specification unclear 2272: quoted should use char_traits::eq for character comparison 2278: User-defined literals for Standard Library types 2280: begin / end for arrays should be constexpr and noexcept 2285: make_reverse_iterator 2288: Inconsistent requirements for shared mutexes 2291: std::hash is vulnerable to collision DoS attack 2293: Wrong facet used by num_put::do_put 2299: Effects of inaccessible key_compare::is_transparent type are not clear 2301: Why is std::tie not constexpr? 2304: Complexity of count in unordered associative containers 2306: match_results::reference should be value_type&, not const value_type& 2308: Clarify container destructor requirements w.r.t. std::array 2313: tuple_size should always derive from integral_constant<size_t, N> 2314: apply() should return decltype(auto) and use decay_t before tuple_size 2315: weak_ptr should be movable 2316: weak_ptr::lock() should be atomic 2317: The type property queries should be UnaryTypeTraits returning size_t 2320: select_on_container_copy_construction() takes allocators, not containers 2322: Associative(initializer_list, stuff) constructors are underspecified 2323: vector::resize(n, t)'s specification should be simplified 2324: Insert iterator constructors should use addressof() 2329: regex_match()/regex_search() with match_results should forbid temporary strings 2330: regex("meow", regex::icase) is technically forbidden but should be permitted 2332: regex_iterator/regex_token_iterator should forbid temporary regexes 2339: Wording issue in nth_element 2341: Inconsistency between basic_ostream::seekp(pos) and basic_ostream::seekp(off, dir) 2344: quoted()'s interaction with padding is unclear 2346: integral_constant's member functions should be marked noexcept 2350: min, max, and minmax should be constexpr 2356: Stability of erasure in unordered associative containers 2357: Remaining "Assignable" requirement 2359: How does regex_constants::nosubs affect basic_regex::mark_count()? 2360: reverse_iterator::operator*() is unimplementable [1] http://libcxx.llvm.org/cxx1y_status.html [2] http://libcxx.llvm.org/cxx1z_status.html [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html Exp-run: antoine MFC r277944: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC r278010: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd MFC r278016: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw()
* MFC r278313:kib2015-02-131-4/+1
| | | | Fully initialize allocated memory for the new barrier.
* MFC r276079, r276087:ian2015-02-1110-28/+44
| | | | | | | | Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator.
* MFC r278182:ngie2015-02-112-2/+8
| | | | | | | | | r278182: Conditionalize building radius support into libpam, ppp, etc via MK_RADIUS_SUPPORT Sponsored by: EMC / Isilon Storage Division
* MFC r277727:ngie2015-02-111-0/+2
| | | | | | | | r277727: Add MK_BHYVE knob for building and installing bhyve(4), et al Sponsored by: EMC / Isilon Storage Division
* MFC r268857: ttyname(3): Fix EBADF/ENOTTY error descriptions.jilles2015-02-081-5/+21
| | | | | | | Also, make sure to document the return values and errors for all three functions in the man page. PR: 191931
* MFC r278038: ttyname_r(): Return actual error, not always [ENOTTY].jilles2015-02-081-2/+2
| | | | | | Adjust the test that used to fail because of this bug. PR: 191936
* MFC: r265863bapt2015-02-084-9/+35
| | | | | | | | | libedit: add H_SAVE_FP which saves history to a file pointer. H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename. This is useful when operating in capability mode. Reviewed by: christos@NetBSD.org, pfg
* MFC r277862: sem_post(): Fix and document semaphore value overflow error.jilles2015-02-082-3/+8
| | | | | | | | The error code is per Austin Group issue #315. I provided different wording for the manual page change. Submitted by: pluknet
* Revert r278017 (MFC of r273381 and r276417) and r278018 (MFC of r273434)dim2015-02-011-9/+0
| | | | until I can figure out why it leads to link failures in some scenarios.
* MFC r273381 (by bapt):dim2015-01-311-0/+9
| | | | | | | | | | | | | | | | | | | | | Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390
* Merge libedit fixes from NetBSDemaste2015-01-305-13/+14
| | | | | | | | | | | | | | | | | | | | Add trailing NULL's to the varargs functions as required. (John Spencer) readline.c r1.106 Bounds search for reallocated index, from OpenBSD via Andreas Fett map.c 1.34 map.h 1.10 parse.c 1.27 read.c 1.71 This is a direct commit to stable/10 as these changes are included in a broader sync with NetBSD committed by bapt@ in r276881. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1728
* MFH (r277237): pass PAM_RHOST to RADIUS server as Calling-Station-IDdes2015-01-291-12/+18
|
* MFC r277245:hselasky2015-01-282-0/+8
| | | | | Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification"
* Merge 272659:luigi2015-01-263-0/+287
| | | | | | | | | | | | | | | | Add netmap support to libpcap. Tcpdump and other native pcap clients can now run directly on netmap ports using netmap:foo or valeXX:YY as device names. Modifications to existing code are small and trivial, the netmap-specific code is all in a new file. Please be aware that in netmap mode the physical interface is disconnected from the host stack, so libpcap will steal the traffic not just make a copy. For the full version of the code (including linux and autotools support) see https://code.google.com/p/netmap-libpcap/
* MFC r277322:kib2015-01-251-1/+78
| | | | | Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger attachment to the process.
* MFC r277488:kib2015-01-241-1/+2
| | | | Do not allow pthread_sigmask() to block SIGCANCEL.
* MFC r276577: MFV r276568:delphij2015-01-231-3/+3
| | | | Update file to 5.22.
* libelf: Improve ELF header validationemaste2015-01-231-2/+5
| | | | | | Avoid integer overflow and reading past EOF. MFC of r276427, r276443, r277249 from contrib/elftoolchain.
* MFC r274816:brooks2015-01-222-4/+153
| | | | | | | | | | | | | | Add FPU support for MIPS setjmp(3)/longjmp(3). This change saves/restores the callee-saved MIPS floating point registers as documented by the o32/n32/n64 spec ("MIPSpro N32 ABI Handbook", Table 2-1) for the _setjmp(3), _longjmp(3), setjmp(3) and longjmp(3) C library functions. This is only included when the C library is built with hardware floating point support (or when "SOFTFLOAT" is not defined). Submitted by: sson Sponsored by: DARPA, AFRL
* MFC r267004,r274592:ngie2015-01-202-0/+302
| | | | | | | | | | | | | | | | r267004 (by gahr): - Use strlen instead of hardcoding a number - Terminate a sentence with a period Approved by: cognet r274592 (by ngie): Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division
* MFC r276590:ngie2015-01-201-14/+16
| | | | | | | | | | | | | | | r276590 (by jilles): Link lib/libc/c063 tests to the build. Some files lack required #include <sys/stat.h>. The #ifdef is per ngie's request; the includes are clearly necessary for struct stat. The faccessat test fails because it tries to use AT_SYMLINK_NOFOLLOW with faccessat(), which is not specified by POSIX.1-2008. Differential Revision: https://reviews.freebsd.org/D1411 Reviewed by: ngie
* MFC r276318:ngie2015-01-201-1/+7
| | | | | | | | r276318 (by ngie): Build/install lib/libc/tests/hash/t_sha2 if MK_OPENSSL == yes Reported by: Beeblebrox <zaphod@berentweb.com>
* MFC r274075,r274581,r274582,r274595:ngie2015-01-2031-0/+936
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r274075 (by ngie): Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately 500 new testcases Various TODOs have been sprinkled around the Makefiles for items that even need to be ported (missing features), testcases have issues with building/linking, or issues at runtime. A variant of this code has been tested extensively on amd64 and i386 10-STABLE/11-CURRENT for several months without issue. It builds on other architectures, but the code will remain off until I have prove it works on virtual hardware or real hardware on other architectures In collaboration with: pho, Casey Peel <casey.peel@isilon.com> Sponsored by: EMC / Isilon Storage Division r274581 (by ngie): Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and rename as lib/libc/gen/arc4random_test Sponsored by: EMC / Isilon Storage Division r274582 (by ngie): Remove test-arc4random from this Makefile so others can continue to use this as-is for the time being r274595 (by ngie): Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and Rename as lib/libc/stdio/fpclassify2_test Sponsored by: EMC / Isilon Storage Division
* Fix known issues which blow up the process after dlopen("libthr.so")kib2015-01-1863-627/+2220
| | | | | | | | | | | | | | | | | | | | | (or loading a dso linked to libthr.so into process which was not linked against threading library). MFC r276630: Remove interposing, fix malloc, reinstall signal handlers wrappers on libthr load. MFC r276681: Avoid calling internal libc function through PLT or accessing data though GOT. MFC r277032: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. MFC note: r276646 ("do not erronously export 'openat' symbol from rtld") is not applicable to stable/10 yet, since PATHFDS support was not merged.
* MFC r277147:dim2015-01-171-0/+16
| | | | | | | | | | | | | | | | | Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D1518
* MFC r276412:nwhitehorn2015-01-141-1/+6
| | | | | | | Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to be some kind of problem with the version of makefs used for these disks. There may be a better way to handle this problem, so I've set the MFC timer for a fairly long time period.
OpenPOWER on IntegriCloud