atomic(9) primitives are documented as operating on unsigned types.
Here, we need a cast to avoid a tautological comparison.
Add a regression test for access(2), which was affected by the bug.
Reported by: NetApp
Reviewed by: kib
Fixes: e511bd1406 ("vfs: fully lockless v_writecount adjustment")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47672
If net80211 announces support for GCMP and/or BIP then configure it
appropriately.
GCMP will be used by WPA3 in the future, and BIP is required for
802.11w/MFP (which is also required by WPA3.)
Differential Revision: https://reviews.freebsd.org/D46499
Building world using WITH_ASAN results in an assertion when compiling
certain source files referencing ifuncs:
Assertion failed: (isa<Function>(Callee) || isa<GlobalAlias>(Callee)), function analyzeAllUses, file /root/freebsd/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp, line 514.
This was already reported upstream a while ago, in
<https://github.com/llvm/llvm-project/issues/87923>, but now there is
finally a candidate fix, which seems trivial so I am importing it right
away.
Reported by: markj
PR: 280936
Pull Request: https://github.com/llvm/llvm-project/pull/113841
MFC after: 3 days
C23 (ISO/IEC 9899:2024) is not out yet, but will be shortly.
SVID1 is needed for the history section of memccpy(3).
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47284
Unfortunately gcc 12's is not yet capable of compiling all of libc++
19's C++23 code, which results in errors similar to:
/usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:41:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Iter, _Sent, const _Type&, _Proj)' must be a non-static member function
41 | operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) {
| ^~~~~~~~
/usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:48:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Range&&, const _Type&, _Proj)' must be a non-static member function
48 | operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) {
| ^~~~~~~~
Until we can get rid of gcc 12, work around this by making it compile
libc++ in C++20 mode instead.
NOTE: The resulting libc++ library will not be C++23 compatible! Please
try to avoid shipping it, and use gcc 13 instead, if you must use gcc.
PR: 280562
MFC after: 3 days
Some internal checking functions should only be declared when both
NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS are undefined, otherwise you
would get compile errors similar to:
/usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:921:13: error: no member named 'VerifyDAGDivergence' in 'llvm::SelectionDAG'
921 | CurDAG->VerifyDAGDivergence();
| ~~~~~~ ^
Adjust the conditions for declaring and using these functions. This has
also been reported upstream.
Reported by: cy
PR: 280562
MFC after: 1 month
[Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (#107815)
Fixes#107777
This fixes an assertion failure building www/qt5-webengine:
Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"), function setPointOfInstantiation, file contrib/llvm-project/clang/include/clang/AST/DeclTemplate.h, line 1938.
PR: 280562
MFC after: 1 month
[libc++] Use GCC type traits builtins for remove_cv and remove_cvref (#81386)
They have been added recently to GCC without support for mangling. This
patch uses them in structs and adds aliases to these structs instead of
the builtins directly.
PR: 280562
MFC after: 1 month
[libc++] Simplify the implementation of remove_reference (#85207)
GCC 13 introduced the type trait `__remove_reference`. We can simplify
the implementation of `remove_reference` a bit by using it.
PR: 280562
MFC after: 1 month
[libc++] Merge is_member{,_object,_function}_pointer.h (#98727)
The implementations for these traits have been simplified quite a bit,
since we have builtins available for them now.
PR: 280562
MFC after: 1 month
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.
PR: 280562
MFC after: 1 month
Interesting fixes:
045c52c Mark __cxa_allocate_exception, __cxa_free_exception and
__cxa_init_primary_exception noexcept.
8a2f123 Define _LIBCXXRT_NOEXCEPT in cxxabi.h and use it instead of
throw()
9529236 Fix memory corruption in cpp_demangle_read_sname()
8f5c74e Add test cases, fix more bugs, and improve perf
391a3dc Add a simple implementation of __cxa_call_terminate
40e4fa2 mark std::terminate as noreturn and noexcept
5eede09 Print diagnostics in default std::terminate handler
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47238
Libarchive 3.7.7
Security fixes:
#2158 rpm: calculate huge header sizes correctly
#2160 util: fix out of boundary access in mktemp functions
#2168 uu: stop processing if lines are too long
#2174 lzop: prevent integer overflow
#2172 rar4: protect copy_from_lzss_window_to_unp() (CVE-2024-20696)
#2175 unzip: unify EOF handling
#2179 rar4: fix out of boundary access with large files
#2203 rar4: fix OOB access with unicode filenames
#2210 rar4: add boundary checks to rgb filter
#2248 rar4: fix OOB in delta filter
#2249 rar4: fix OOB in audio filter
#2256 fix multiple vulnerabilities identified by SAST
#2258 cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
#2265 rar5: clear 'data ready' cache on window buffer reallocs
#2269 rar4: fix CVE-2024-26256 (CVE-2024-26256)
#2330 iso: be more cautious about parsing ISO-9660 timestamps
#2343 tar: clean up linkpath between entries
#2364 tar: don't crash on truncated tar archives
#2366 gzip: prevent a hang when processing a malformed gzip inside a gzip
#2377 tar: fix two leaks in tar header parsing
Important bugfixes:
#2096 rar5: report encrypted entries
#2150 xar: fix another infinite loop and expat error handling
#2173 shar: check strdup return value
#2161 lha: fix integer truncation on 32-bit systems
#2338 tar: fix memory leaks when processing symlinks or parsing pax headers
#2245 7zip: fix issue when skipping first file in 7zip archive that
is a multiple of 65536 bytes
#2252 7-zip: read/write symlink paths as UTF-8
#2259 rar5: don't try to read rediculously long names
#2290 ar: fix archive entries having no type
#2360 tar: fix truncation of entry pathnames in specific archives
CVE: CVE-2024-20696, CVE-2024-26256
PR: 282047 (exp-run)
MFC after: 1 week
The changes between the two versions can be found in this diff of the
two release tags:
https://github.com/google/googletest/compare/v1.14.0...v1.15.2
One notable change is that GoogleTest 1.15.x now officially requires
C++-14 (1.14.x required C++-11).
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47197
Merge commit '14f7077fed7d82046bdcbe347004132f08aba886'
As of commit 91a9e4e01d ("capsicum: propagate rights on sctp_peeloff")
a capability is generated from sctp_peeloff(cap_fd,...). Enable the
corresponding test code.
PR: 201052
Reviewed by: oshogbo, tuexen
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47000
HAVE_SCTP is #defined in syscalls.h, so move the #ifdef after the
inclusion of the header that #defines it.
Issue https://github.com/google/capsicum-test/issues/60 is open upstream
in case a slightly different version is needed for Linux.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46995
As of commit 85b0f9de11 ("capsicum: propagate rights on accept(2)")
a capability is generated from accept(cap_fd,...). Enable the
corresponding test code.
PR: 201052
Reviewed by: oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46994
It changes output of 'kyua test' CLI command only. Hence, other outputs
like junit are kept intact for CI and other use cases. It's meant to
improve UX of attended use cases.
The issue is that the following can be tricky to interpret:
222/222 passed (0 failed)
It can be read as all tests are passed, but it might be a summary line
of all tests skipped due to some requirement is not met.
It's reworked to easily distinguish such cases:
222/222 passed (0 broken, 0 failed, 0 skipped)
0/222 passed (0 broken, 0 failed, 222 skipped)
The overall formula is:
<actually passed>/<total> (<details about not actually passed ones>)
Suggested by: kp
Reviewed by: ngie, markj
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D46653
In libpcap 1.10.5, two structures that we relied on, pcap_timeval and
pcap_sf_pkthdr, were made private. As a workaround, we initially
defined the structures in pflogd.h. After further investigation, mostly
by kp@, we concluded that it is reasonable to define these structures
ourselves since they represent a file format and thus are unlikely to
change from under us. We will stick with this solution but move the
definitions out of the header file to prevent others from using pflogd.h
to access them.
Another solution that was considered was using libpcap's pcap_dump()
function to write packets, but there are blockers. For example, pflogd
writes to a memory buffer, and libpcap lacks support for this.
Reviewed by: kp
MFC after: 3 days
Event: EuroBSDCon 2024
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46894
This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D46873
and allow to revert it back to 48 with WITHOUT_JEMALLOC_LG_VADDR_WIDE build
option.
Reviewed by: andrew, emaste
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46686