Commit Graph

10289 Commits

Author SHA1 Message Date
Simon J. Gerraty 1729d2f741 Merge bmake-20260508
Merge commit 'ef402bba84260816d3e8d6e2439b0bc7eddc9446'
2026-05-12 21:26:44 -07:00
Philip Paeps 9cc9b8b372 contrib/expat: import expat 2.8.1
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_1/expat/Changes

Security:	CVE-2026-45186
MFC after:	1 week
2026-05-13 11:26:56 +08:00
Chuck Tuffli 346be36e88 smart: Merge smart 1.0.3
Merge commit 'd2d20bb5099dc1c443a4b783d43b8a45338c85d2'
2026-05-12 07:33:03 -07:00
Chuck Tuffli 7419d6e463 Add 'contrib/smart/' from commit 'eb3b1302382b1d0cbe37eeebabfcdd546aa2fc4e'
git-subtree-dir: contrib/smart
git-subtree-mainline: 95b4436e98
git-subtree-split: eb3b130238
2026-05-11 14:50:04 -07:00
Hartmut Brandt 27ad506d26 Document some more OIDs that are used by bsnmp. 2026-05-09 18:04:45 +02:00
Chuck Silvers 7906084ba2 Fix some memory leaks when fetching the mibII.
Reviewed by:	glebius
Sponsored by:	Netflix
Differential Revision:	<https://reviews.freebsd.org/D55998>
2026-05-09 17:52:14 +02:00
Dimitry Andric d9b272a19d Merge commit 871038759afb from llvm git (by Marco Elver):
Thread Safety Analysis: Fix pointer handling of variables with deprecated attributes (#148974)

  de10e44b6fe7 ("Thread Safety Analysis: Support warning on
  passing/returning pointers to guarded variables") added checks for
  passing pointer to guarded variables. While new features do not
  necessarily need to support the deprecated attributes (`guarded_var`,
  and `pt_guarded_var`), we need to ensure that such features do not cause
  the compiler to crash.

  As such, code such as this:

          struct {
            int v __attribute__((guarded_var));
          } p;

          int *g() {
            return &p.v;  // handleNoMutexHeld() with POK_ReturnPointer
          }

  Would crash in debug builds with the assertion in handleNoMutexHeld()
  triggering. The assertion is meant to capture the fact that this helper
  should only be used for warnings on variables (which the deprecated
  attributes only applied to).

  To fix, the function handleNoMutexHeld() should handle all POK cases
  that apply to variables explicitly, and produce a best-effort warning.

  We refrain from introducing new warnings to avoid unnecessary code bloat
  for deprecated features.

  Fixes: https://github.com/llvm/llvm-project/issues/140330

This fixes an assertion while building the net/openvswitch port:
"Assertion failed: ((POK == POK_VarAccess || POK == POK_VarDereference)
&& "Only works for variables"), function handleNoMutexHeld, file
/usr/src/contrib/llvm-project/clang/lib/Sema/AnalysisBasedWarnings.cpp,
line 2120.'

Reported by:	cy
PR:		295101, 292067
MFC after:	1 month
2026-05-08 19:59:54 +02:00
Dag-Erling Smørgrav 8acc4c16c6 vis.3: Try to better describe VIS_SAFE
The current text fails to draw the reader's attention to the fact that
VIS_SAFE essentially exempts certain characters from being encoded.

While here, fix some markup nits.

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56716
2026-05-04 14:08:10 +02:00
Dimitry Andric 19ff93c921 Revert 00bee6fcd7, which partially reverted libc++ commit aa7f377c965c
After base 966fb94cb3, this revert is no longer necessary: stdint.h
will unconditionally define macros such as `SIZE_MAX`, `UINT64_C`, and
others.

Submitted by:   Nikolas Klauser <nikolasklauser@berlin.de>
MFC after:      1 month
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746
2026-05-01 20:16:18 +02:00
Siva Mahadevan cb0e3a5fba contrib/openresolv: MFV openresolv 3.17.4
Reviewed by:	pfg
Approved by:	lwhsu (mentor)
Differential Revision:	https://reviews.freebsd.org/D56269
2026-04-28 15:26:59 -04:00
Chuck Tuffli e139a49b5d Revert "Vendor import of smart at 1.0.2"
This reverts commit 68e5b71517.
2026-04-28 12:03:38 -07:00
Chuck Tuffli 68e5b71517 Vendor import of smart at 1.0.2
smart/diskhealth is a command line application to monitor disk health
from a storage device via SMART.

Reviewed by:	fuz, jrm
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D56638
2026-04-28 10:08:27 -07:00
Philip Paeps e3935639d8 contrib/expat: import expat 2.8.0
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_0/expat/Changes

Security:	CVE-2026-41080
MFC after:	1 week
2026-04-27 16:24:36 +05:45
Mark Johnston e3b8e55e71 netbsd-tests: Fix the mmap_truncate_signal test
Add a volatile qualifier in the loop which triggers SIGBUS, as otherwise
the compiler is smart enough to elide it, replacing it with a check for
page != 0.

MFC after:	1 week
2026-04-26 01:56:14 +00:00
Dimitry Andric 3cbf898fb4 Add a comment to llvm's OptParser.td, so dependent files get rebuilt.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:23 +02:00
Dimitry Andric 20450c2e79 Merge commit b0d2b57f7e47 from llvm git (by Phoebe Wang):
[Headers][X86] Remove more duplicated typedefs (#153820)

  They are defined in mmintrin.h

This fixes a -Werror warning in openzfs, which compiles for C99, and C99
does not allow for typedef redefinitions.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:23 +02:00
Dimitry Andric 4fc1fdd206 Merge commit c1d26c3c2510 from llvm git (by Nikolas Klauser):
[libc++] Fix iostream size ABI break (#185839)

  In #124103 we changed the size of various iostream objects, which turns
  out to be ABI breaking when compiling non-PIE code.

  This ABI break is safe to fix, since for any programs allocating more
  memory for the iostream objects, the remaining bytes are simply unused
  now.

  Fixes #185724

This fixes the ABI break that causes programs that use the standard
streams to terminate in various interesting ways, usually by throwing an
unexpected std::bad_cast exception.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 5ac874516b Merge commit 787ba2426148 from llvm git (by Matheus Izvekov):
[clang] create local instantiation scope for matching template template parameters (#183219)

  This fixes a bug where a partial substitution from the enclosing scope
  is used to prepopulate an unrelated template argument deduction.

  Fixes #181166

This fixes an expected error when building the devel/catch port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 0f15398d12 Fixup mismerge in __cxx03/__type_traits/add_[lr]value_reference.h.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 1dfe63e4f7 Merge commit d803c61aca0d from llvm git (by Corentin Jabot):
[Clang] Fix a regression introduced by #147046 (#150893)

  Static functions have an implicit object argument during deduction.

This fixes an assertion while compiling the devel/corrade port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 3fd796204f Merge commit 924f773f5e26 from llvm git (by Younan Zhang):
[Clang] Don't diagnose missing members when looking at the instantiating class template (#180725)

  The perfect matching patch revealed another bug where recursive
  instantiations could lead to the escape of SFINAE errors, as shown in
  the issue.

  Fixes https://github.com/llvm/llvm-project/issues/179118

This fixes compile errors in the www/qt5-webengine port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 17f1a5e638 libcxx-compat: fix llvmorg-21-init-12415-g3a86e0bd29f3:
[libc++] Optimize std::getline (#121346)

  ```
  -----------------------------------------------
  Benchmark                   old             new
  -----------------------------------------------
  BM_getline_string        318 ns         32.4 ns
  ```

Move the __bump_stream() lamda in <istream> to a separate function, so
this will compile with clang 18 and lower, in C++03 mode and earlier.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 987ac31018 libcxx-compat: fix llvmorg-21-init-18351-gfcc09b6f0267:
[libc++] Fix std::make_exception_ptr interaction with ObjC (#135386)

  Clang treats throwing/catching ObjC types differently from C++ types,
  and omitting the `throw` in `std::make_exception_ptr` breaks ObjC
  invariants about how types are thrown/caught.

  Fixes #135089

  Co-authored-by: Louis Dionne <ldionne.2@gmail.com>

Only use lambdas when in !defined(_LIBCPP_CXX03_LANG), so this will
compile with clang 18 and lower, in C++03 mode and earlier.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 5465db314a libcxx-compat: revert llvmorg-21-init-8400-g703cfe745b96:
[libc++] Replace __libcpp_popcount by __builtin_popcountg (#133937)

  `__libcpp_popcount` was previously used as a fallback for `__builtin_popcountg` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_popcountg` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely  replace all instances of `__libcpp_popcount` with `__builtin_popcountg` and eliminate the fallback logic.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric 035396ceda libcxx-compat: revert llvmorg-21-init-10154-ge43e8ec7afbd:
[libc++] Remove dead implementation of is_nothrow_convertible and merge the remaining code into is_convertible.h (#137717)

  We can use the `__is_nothrow_convertible` builtin unconditionally now,
  which makes the implementation very simple, so there isn't much of a
  need to keep a separate header around.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric a114ece3e6 libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:
[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.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric bb6713d38c libcxx-compat: revert llvmorg-21-init-15984-g650b451d0065:
[libc++] Simplify the implementation of pointer_traits a bit (#142260)

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric 821fc643b3 libcxx-compat: revert llvmorg-21-init-9130-g9e3982d9ae81:
[libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920)

  `__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely  replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic.

  Closes #131179.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:19 +02:00
Dimitry Andric 7351d001fc Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a,
a.k.a. 21.1.8 release.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:13 +02:00
Dimitry Andric 48c35ae6eb Merge commit 598f21e9fcf7 from llvm git (by zhijian lin):
[PowerPC] need to set CallFrameSize for the pass  PPCReduceCRLogicals when insert a new block (#151017)

  In the [ [CodeGen] Store call frame size in
  MachineBasicBlock](https://reviews.llvm.org/D156113), it mentions When a
  basic block has been split in the middle of a call sequence. the call
  frame size may not be zero, it need to set the setCallFrameSize for the
  new MachineBasicBlock. but in the function `splitMBB(BlockSplitInfo
  &BSI)` in the llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp , it do
  not setCallFrameSzie for the new MachineBasicBlock `NewMBB`, we will
  setCallFrameSzie in the patch.

  the patch fix the crash mention in
  https://github.com/llvm/llvm-project/pull/144594#issuecomment-2993736654

This fixes "error in backend: Found 1 machine code errors" while
crypto/openssh/packet.c for PowerPC64.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:12 +02:00
Dimitry Andric 718e5874be llvm-libc-macros: work around gcc defining LDBL_MANT_DIG as 53 on i386
Otherwise, gcc will not be able to compile parts of libc++ 21 in -m32
mode, resulting in errors similar to:

    In file included from /usr/src/contrib/llvm-project/libc/shared/str_to_float.h:13,
                     from /usr/src/contrib/llvm-project/libcxx/src/include/from_chars_floating_point.h:14,
                     from /usr/src/contrib/llvm-project/libcxx/src/charconv.cpp:12:
    /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h: In function 'void __llvm_libc::internal::set_implicit_bit(__llvm_libc::fputil::FPBits<T>&) [with T = long double]':
    /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h:77:10: error: 'struct __llvm_libc::fputil::FPBits<long double>' has no member named 'set_implicit_bit'
       77 |   result.set_implicit_bit(result.get_biased_exponent() != 0);
          |          ^~~~~~~~~~~~~~~~

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric f7bcd8d8c9 libcxx-compat: revert llvmorg-21-init-17684-gae9990ed9651:
[libc++] Remove dead code from <type_traits> (#143854)

  Since we've upgraded to GCC 15 now, we can remove a bunch of dead code
  from `<type_traits>`.

This is part of making libc++ 21 build with GCC 14.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric ad1f6ee5d7 libcxx-compat: revert llvmorg-21-init-19251-g0c3a2faa8505:
[libc++] Simplify the implementation of __libcpp_{,de}allocate (#147989)

  GCC 15 also supports `__buitin_operator_{new,delete}` now, so the
  `#else` cases are dead code. This patch inlines the calls to the wrapper
  functions and simplifies some surrounding code.

This is part of making libc++ 21 build with GCC 14.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric 00bee6fcd7 Partially revert libc++ commit aa7f377c965c, restoring stdint.h
This partially reverts upstream libc++ commit aa7f377c965c:

  [libc++] Remove libc++'s own stdint.h and locale.h (#107436)

  These headers are not doing anything beyond the system or compiler
  provided equivalent headers, so there's no real reason to keep them
  around. Reducing the number of C headers we provide in libc++ simplifies
  our header layering and reduces the potential for confusion when headers
  are layered incorrectly.

The problem is that libc++'s own `stdint.h` _does_ do something: it
defines `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` before
including the system `stdint.h`, causing the latter to expose macros
like `SIZE_MAX`, `UINT64_C`, and others.

If the `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` macros are not
exposed, C++ programs compiled for standards before C++11 can fail with
errors due to those macros not being available.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric e64bea71c2 Merge llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2,
a.k.a. 21.1.7 release.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:02 +02:00
Dimitry Andric 770cf0a5f0 Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge
Fix various configuration fails, update generated headers, Makefiles, etc.

PR:		292067
MFC after:	1 month
2026-04-25 16:11:52 +02:00
Dimitry Andric bb722a7d0f Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 3
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add more
items to the libc/ top-level directory.

PR:		292067
MFC after:	1 month
2026-04-25 16:08:58 +02:00
Dimitry Andric 8f6978f83c Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 2
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial
libc/ top-level directory.

PR:		292067
MFC after:	1 month
2026-04-25 16:08:57 +02:00
Dimitry Andric 3f16c588d1 Adjust llvm-project main llvmorg-21-init-19288-gface93e724f4, part 1
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial
third-party/ top-level directory.

PR:		292067
MFC after:	1 month
2026-04-25 16:08:57 +02:00
Dimitry Andric 700637cbb5 Merge llvm-project main llvmorg-21-init-19288-gface93e724f4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the
last commit before the upstream release/21.x branch was created.

PR:		292067
MFC after:	1 month
2026-04-25 16:08:55 +02:00
Dimitry Andric 6243d755fb Revert "libcxx-compat: revert llvmorg-19-init-18063-g561246e90282:"
This reverts commit 1d99ada3215dbc28665fe051f9ccf028a2a02ce8, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:43 +02:00
Dimitry Andric f3b0cac70b Revert "libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5:"
This reverts commit 6933315cf57fc3f505431bff7a0075df471d7453, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:43 +02:00
Dimitry Andric 3b0a0e64bd Revert "libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:"
This reverts commit 2facc097b9b28a81b925c924f27f09b40f29fd4d, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:43 +02:00
Dimitry Andric f8152c67d4 Revert "libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:"
This reverts commit 198b947ebc6834eade6acc52c5441a38693b8822, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:42 +02:00
Dimitry Andric 1f9c1cd08d Revert "libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc:"
This reverts commit f12b6acbe1ea1c425c0e21d80097115e4ad33017, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:42 +02:00
Dimitry Andric 501871ebf9 Revert "libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455:"
This reverts commit cab3680acf8e6ea40c686d4f26db4429e26a5331, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:42 +02:00
Dimitry Andric a843ea3f24 Revert "libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed:"
This reverts commit f7570f1eb0dc056dfce9d7500157538c670edaf6, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:42 +02:00
Dimitry Andric 3ac42330b1 Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:"
This reverts commit 267fa9ab814c23ca97b8b7e1740f4da51485ac72, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:41 +02:00
Dimitry Andric 3ca6facafc Revert "libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e:"
This reverts commit a7455c47801ea1e4c4eed10cab2072375f6f92a2, in
preparation for merging llvm 21, in preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:41 +02:00
Dimitry Andric a24406d2e0 Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:"
This reverts commit fd17362f6225085e60eabed8af7421838100b457, in
preparation for merging llvm 21.

PR:		292067
MFC after:	1 month
2026-04-25 16:07:41 +02:00