Commit graph

9539 commits

Author SHA1 Message Date
Martin Matuska c923dda75a libarchive: merge bugfixes from vendor branch
#2147 archive_string: clean up strncat_from_utf8_to_utf8 (36047967a)
 #2153 archive_match: check archive_read_support_format_raw()
       return value (0ce1b4c38)
 #2154 archive_match: turn counter into flag (287e05d53)
 #2155 lha: Do not allow negative file sizes (93b11caed)
 #2156 tests: setenv LANG to en_US.UTF-8 in bsdunzip test_I.c (83e8b0ea8)

(cherry picked from commit c0b58e65de)
2024-05-04 13:55:21 +02:00
Martin Matuska 3a77c21a25 libarchive: merge from vendor branch
Libarchive 3.7.4 + three fixes from master

Security fixes:
 #2135 rar: Fix OOB in rar e8 filter (CVE-2024-26256)
 #2145 zip: Fix out of boundary access
 #2148 rar: Fix OOB in rar delta filter
 #2149 rar: Fix OOB in rar audio filter

Important bugfixes:
 #2131 7zip: Limit amount of properties
 #2110 bsdtar: Fix error handling around strtol() usages
 #2116 passphrase: Never allow empty passwords
 #2124 rar: Fix "File CRC Error" when extracting specific rar4 archives
 #2123 xar: Avoid infinite link loop
 #2150 xar: Fix another infinite loop and expat error handling
 #2108 zip: Update AppleDouble support for directories
 #2071 zstd: Implement core detectiongit

PR:	278662 (exp-run)

(cherry picked from commit 13d826ff94)
2024-05-04 13:54:42 +02:00
Martin Matuska 4217cc09bd libarchive: fix null format string error in tests (unbreaks gcc13 build)
Obtained from:	libarchive (d43c39247)

(cherry picked from commit 701d0666c0)
2024-05-04 13:53:07 +02:00
Martin Matuska aa2aad0492 libarchive: merge from vendor branch
Libarchive 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links
  #2105 rar5: fix infinite loop if during rar5 decompression the last
        block produced no data
  #2027 xz filter: fix incorrect eof at the end of an lzip member
  #2043 zip: fix end-of-data marker processing when decompressing zip
        archives

(cherry picked from commit b9128a37fa)
2024-05-04 13:53:07 +02:00
Martin Matuska db2cc817fa libarchive: merge from vendor branch
Changes to not yet connected unzip only.

(cherry picked from commit 058ab969fd)
2024-05-04 13:53:07 +02:00
Martin Matuska 0db84579ce libarchive: merge from vendor branch
Changes to not yet connected unzip only.

(cherry picked from commit d91bfe0fb7)
2024-05-04 13:53:07 +02:00
Martin Matuska 2cb0ab6bc1 libarchive: merge from vendor branch
Libarchive 3.7.1

Important changes (relevant to FreeBSD):
  ISSUE #1934: stack buffer overflow in cpio verbose mode
  ISSUE #1935: SEGV in cpio verbose mode
  PR #1731 tar: respect --strip-components and -s patterns in cru modes

(cherry picked from commit 64884e0d4c)
2024-05-04 13:53:07 +02:00
Martin Matuska cd09ca5e71 libarchive: merge from vendor branch
Libarchive 3.7.0

Important changes (relevant to FreeBSD):
  #1814 Do not account for NULL terminator when comparing with "TRAILER!!!"
  #1818 Add ability to produce multi-frame zstd archives
  #1840 year 2038 fix for pax archives on platforms with 64-bit time_t
  #1860 Make single bit bitfields unsigned to avoid clang 16 warning
  #1869 Fix FreeBSD builds with WARNS=6
  #1873 bsdunzip ported to libarchive from FreeBSD
  #1894 read support for zstd compression in 7zip archives
  #1918 ARM64 filter support in 7zip archives

(cherry picked from commit e64fe029e9)
2024-05-04 13:53:07 +02:00
Pierre Pronchery d2291dbb3c libarchive: Avoid a build failure with OpenSSL 3.0
This is a minimal workaround; a proper fix will come via a future update
from upstream.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit e23d45187b)
2024-05-04 13:53:07 +02:00
Jessica Clarke 2714c4d328 mandoc: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
macOS, like Linux, does not include an outer const qualifier for its
fts_open callback arguments, so -Wincompatible-function-pointer-types
also picks this up and breaks the build now Clang 16 makes it an error
by default. Extend the existing Linux support to fix this.

MFC after:	1 week

(cherry picked from commit ce312ef72d)
2024-05-02 21:11:52 +01:00
Alex Richardson dbbbe6f393 mandoc: fix bootstrapping on Linux with Clang 16
It appears that Clang 16 errors by default for the mismatched function
pointer types that are triggered by the fts callback (since glibc has a
callback type without the second const qualifier).
Fortunately, there is already code to handle glibc inside mandoc, we
just have to edit the checked-in config.h.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D42999

(cherry picked from commit 0156465c6d)
2024-05-02 21:11:52 +01:00
Dimitry Andric b9b248b1df Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric):
[sanitizer_symbolizer] Cast arguments for format strings in markup (#89815)

  When compiling the common sanitizer libraries, there are many warnings
  about format specifiers, similar to:

      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat]
         31 |   buffer->AppendF(kFormatData, DI->start);
            |                   ~~~~~~~~~~~  ^~~~~~~~~
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here
         33 | constexpr const char *kFormatData = "{{{data:%p}}}";
            |                                              ^~
            |                                              %lu
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat]
         46 |   buffer->AppendF(kFormatFrame, frame_no, address);
            |                   ~~~~~~~~~~~~            ^~~~~~~
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here
         36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}";
            |                                                ^~
            |                                                %lu
      ...

  This is because `uptr` is dependent on the platform, and can be either
  `unsigned long long`, `unsigned long`, or `unsigned int`.

  To fix the warnings, cast the arguments to the expected type of the
  format strings.

PR:		276104
Reported by:	pstef
MFC after:	3 days

(cherry picked from commit f08bf5a3ac)
2024-04-28 10:04:33 +02:00
Ricardo Branco 302d0acea8 MFV: less: Do not trust st_size if it equals zero
This is a smaller version of upstream
1fafd968b48e5cea6c85f126d77071a8de707a55 to address the
issue that less not being able to operate on files
residing in pseudo-filesystems that advertize a zero
size value.

PR:		bin/276133

(cherry picked from commit cae336280b)
2024-04-27 00:08:17 -07:00
Dimitry Andric 7929070fb7 Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6.

PR:		276104
MFC after:	3 days

(cherry picked from commit dfa39133b3)
2024-04-23 19:33:14 +02:00
Dimitry Andric 5b763c0e1f Merge commit 37b7207651b4 from llvm-project (by zhongyunde@huawei.com):
[SimplifyCFG] Fix crash when there is unreachable large index (#88616)

  The large case index out of scope is dead code, but it is still be
  created for TableContents in SwitchLookupTable::SwitchLookupTable,
  so make sure the table size after growing should not get smaller.

  Fix https://github.com/llvm/llvm-project/issues/88607

This should fix "Assertion failed: (idx < size()), function operator[]"
when building the science/dynare port.

PR:		276104, 278320
Reported by:	yuri
MFC after:	1 month

(cherry picked from commit 514c98ba14)
2024-04-20 12:29:10 +02:00
Dimitry Andric bf7e13e690 sanitizers: mark __elf_aux_vector as weak, to allow linking without libsys
After libsys was introduced, linking sanitized programs started failing
with:

  # c++ -fsanitize=address main.cc
  ld: error: undefined symbol: __elf_aux_vector
  >>> referenced by sanitizer_linux_libcdep.cpp:950 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
  >>>		    sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a
  c++: error: linker command failed with exit code 1 (use -v to see invocation)

Mark __elf_aux_vector as weak in the internal sanitizer declaration, so
the linker will accept it at link time. The dynamic linker will then
take care of the symbol at run time.

Suggestion by:	brooks
PR:		276104, 277393
MFC after:	1 month

(cherry picked from commit 8b181c2fba)
2024-04-20 12:29:10 +02:00
Dimitry Andric 70ab6e9b18 Revert commit 925a11a5f221 from llvm-project (by Nikolas Klauser):
[libc++] Simplify is_convertible

  GCC 13 has added __is_convertible(), so we don't need to keep the fallback implementation around.

  Reviewed By: #libc, Mordante

  Spies: Mordante, libcxx-commits

  Differential Revision: https://reviews.llvm.org/D157939

This should allow buildworld with gcc 12 to work again.

PR:		276104
MFC after:	1 month

(cherry picked from commit 2365f01295)
2024-04-20 12:29:10 +02:00
Dimitry Andric ac652ee7fb Merge commit 55c466da2f2f from llvm-project (by Benjamin Kramer):
[X86][AVX512BF16] Add a few missing insert/extract patterns

  These are really the same as the f16 (and i16) instructions, but we need
  them for any type that can occur.

Merge commit 2e4e04c59043 from llvm-project (by Phoebe Wang):

  [X86][BF16] Do not lower to VCVTNEPS2BF16 without AVX512VL (#86395)

  Fixes: #86305

These should fix "fatal error: error in backend: Cannot select: t71:
v32bf16 = insert_subvector t67, t64, Constant:i32<16>" when building the
misc/ncnn port.

PR:		278305
Reported by:	yuri
MFC after:	1 month

(cherry picked from commit 78d3648e73)
2024-04-20 12:29:10 +02:00
Dimitry Andric 3a287a03cf Merge llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879.

PR:		276104
MFC after:	1 month

(cherry picked from commit 439352ac82)
2024-04-19 23:24:48 +02:00
Dimitry Andric 8e0b0a2827 Merge commit f5f3d5d6534f from llvm-project (by Qizhi Hu):
[Clang][Sema] Fix a crash in lambda instantiation (#85565)

  Fix https://github.com/llvm/llvm-project/issues/85343
  When build lambda expression in lambda instantiation, `ThisType` is
  required in `Sema::CheckCXXThisCapture` to build `this` capture. Set
  `this` type by import `Sema::CXXThisScopeRAII` and it will be used later
  in lambda expression transformation.

  Co-authored-by: huqizhi <836744285@qq.com>

This fixes 'Assertion failed: (!isNull() && "Cannot retrieve a NULL type
pointer"), function getCommonPtr" when building the x11-wm/wayfire port.

PR:		276104
MFC after:	1 month

(cherry picked from commit 49a6e426df)
2024-04-19 23:24:48 +02:00
Dimitry Andric 64816cf50d Revert commit 6255157d24e2 from llvm-project (by Dimitry Andric):
[libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14

  After many years of using the really old std::pair ABI which did not yet
  have a trivial copy constructor, FreeBSD 14 and later will finally get
  rid of it. Only use the old ABI for FreeBSD 13 and earlier.

  Note: on the FreeBSD side, we will bump our libc++.so version for this,
  and keep an old compatibility library in a separate package.

  Differential Revision: https://reviews.llvm.org/D126462

This ABI change can cause crashes when binaries compiled against older
libc++ versions are run against binaries compiled against this libc++
version.

For example, lang/ldc uses a precompiled bootstrap ldc2 binary that was
compiled against the old libc++, but also links against libLLVM-15.so.
If libLLVM-15.so is compiled against the new libc++ version, the ABI
mismatch results in segfaults or even stack overflows.

Note: we can only re-enable the std::pair trivial copy constructors
again when the official libc++ ABI version is bumped to 2.

PR:		276104
MFC after:	1 month

(cherry picked from commit ce4f1f49e0)
2024-04-19 23:24:48 +02:00
Dimitry Andric b09953d54d Merge llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e.

PR:		276104
MFC after:	1 month

(cherry picked from commit 4c2d3b022a)
2024-04-19 23:24:47 +02:00
Dimitry Andric 7032a43521 Merge llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463.

PR:		276104
MFC after:	1 month

(cherry picked from commit 56727255ad)
2024-04-19 23:24:47 +02:00
Dimitry Andric c80674ff65 Merge llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442.

PR:		276104
MFC after:	1 month

(cherry picked from commit 74626c16ff)
2024-04-19 23:24:47 +02:00
Dimitry Andric 83e37ae556 Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

PR:		276104
MFC after:	1 month

(cherry picked from commit b3edf44679)
2024-04-19 23:24:46 +02:00
Dimitry Andric af050415f0 [libc++] Rename __bit_reference template parameter to avoid conflict
As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
contains a template `__fill_n` with a bool `_FillValue` parameter.

Unfortunately there is a relatively widely used piece of scientific
software called NetCDF, which exposes a (C) macro `_FillValue` in its
public headers.

When building the NetCDF C++ bindings, this quickly leads to compilation
errors when the macro interferes with the template in `__bit_reference`.

Rename the parameter to `_FillVal` to avoid the conflict.

PR:		276104
MFC after:	1 month

(cherry picked from commit 868ee3f285)
2024-04-19 23:24:46 +02:00
Dimitry Andric 6c596be665 Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):
[Clang][AST] Fix a crash on attaching doc comments (#78716)

  This crash is basically caused by calling
  `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
  `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
  files. A reduced reproducer is provided in this patch.

  After the source locations for instantiations of funtion template are
  corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
  variable `CommitsInThisFile` in the function
  `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
  file rather than the header file for implicit function template
  instantiation. Therefore, in the first loop in
  `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
  adjusted for relevant scenarios like the second loop.

  Fixes #67979
  Fixes #68524
  Fixes #70550

This should fix a segfault when compiling graphics/gdal.

PR:		276104
MFC after:	1 month

(cherry picked from commit dc36515b62)
2024-04-19 23:24:46 +02:00
Dimitry Andric 3731f53de1 Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):
Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  https://github.com/llvm/llvm-project/pull/77768#issuecomment-1908062472.

In particular, this fixes bogus "call to constructor of 'SomeType' is
ambiguous" errors.

PR:		276104
MFC after:	1 month

(cherry picked from commit ddbac700c2)
2024-04-19 23:24:45 +02:00
Dimitry Andric a1f98ae0a8 Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

PR:		276104
MFC after:	1 month

(cherry picked from commit 878ed4957e)
2024-04-19 23:24:45 +02:00
Dimitry Andric 206cf542ef Tentatively apply https://github.com/libcxxrt/libcxxrt/pull/27
This marks __cxa_allocate_exception, __cxa_free_exception and
__cxa_init_primary_exception noexcept, to ensure compatibility with
libc++'s declarations.

PR:		276104
MFC after:	1 month

(cherry picked from commit 3fb2e04579)
2024-04-19 23:24:45 +02:00
Dimitry Andric ab50317e96 Merge llvm-project main llvmorg-18-init-18359-g93248729cfae
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
last commit before the upstream release/18.x branch was created.

PR:		276104
MFC after:	1 month

(cherry picked from commit 7a6dacaca1)
2024-04-19 23:24:44 +02:00
Dimitry Andric 412542983a Redo libc++ customizations
* Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
* Instead, add direct major __FreeBSD__ check for using ::gets declaration
* Mark EINTEGRITY values as FreeBSD customization
* Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

PR:		276104
MFC after:	1 month

(cherry picked from commit 46c59ea9b6)
2024-04-19 23:24:43 +02:00
Dimitry Andric 52e4ee64c2 Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

PR:		276104
MFC after:	1 month

(cherry picked from commit 297eecfb02)
2024-04-19 23:24:43 +02:00
Dimitry Andric ed89c59104 Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

PR:		276104
MFC after:	1 month

(cherry picked from commit 1db9f3b21e)
2024-04-19 23:24:41 +02:00
Dimitry Andric 335f7960dc Add two FreeBSD customizations to libc++
This is intended to better support ports usage of older clang versions:
* Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
  version checks, to avoid any warnings about support. This makes some
  ports that use -Werror fall over.
* When using clang < 15.0, avoid using a type visibility attribute on
  the std namespace, as older versions of clang do not support this.

PR:		276104
MFC after:	1 month

(cherry picked from commit 412fa3436f)
2024-04-19 23:24:41 +02:00
Dimitry Andric 15ce79bc8b Tentatively merge https://github.com/llvm/llvm-project/pull/77242
[libcxx] Re-include <osreldate.h> in __config for FreeBSD

  In 0a97720d0197 some changes were made to `__config` for assuming that
  `__BYTE_ORDER__` is always present.

  However, this deleted a `<osreldate.h>` include for FreeBSD, which is
  required to get the value of `__FreeBSD_version`, and that is used later
  in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
  enabled.

  Include `<osreldate.h>` just after the other includes used for feature
  detection, to fix this.

  Note that when FreeBSD 13 is EOLed, this can be removed, as then all
  supported FreeBSD versions will no longer have `gets()`.

PR:		276104
MFC after:	1 month

(cherry picked from commit 653487bbc8)
2024-04-19 23:24:41 +02:00
Dimitry Andric 0c85e2760f Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

PR:		276104
MFC after:	1 month

(cherry picked from commit 647cbc5de8)
2024-04-19 23:24:24 +02:00
Dimitry Andric 92d4d6f1f6 Revert commit 0e46b49de433 from llvm-project (by Matt Arsenault):
Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

  This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

  PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

Since it causes an assertion failure building /sys/dev/fb/vga.c:
https://github.com/llvm/llvm-project/issues/76416

PR:		276104
MFC after:	1 month

(cherry picked from commit edc2dc17b1)
2024-04-19 23:23:59 +02:00
Dimitry Andric a205596100 Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month

(cherry picked from commit cb14a3fe51)
2024-04-19 23:23:58 +02:00
Dimitry Andric b168c9a3e5 Tentatively apply https://github.com/llvm/llvm-project/pull/76175
This fixes libsa including compiler-rt builtins.

PR:		276104
MFC after:	1 month

(cherry picked from commit 3d68ee6cbd)
2024-04-19 23:23:57 +02:00
Dimitry Andric bdbe302c33 Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month

(cherry picked from commit 5f757f3ff9)
2024-04-19 23:23:40 +02:00
Kristof Provost 02ea70eff3 tcpdump: fix build
Apply the change that was supposed to be in bf0700716a
2024-04-18 17:55:34 +02:00
Kristof Provost bf0700716a tcpdump: cope with incorrect packet lengths
It's possible for the capture buffer to be smaller than indicated by the
header length. However, pfsync_print() only took the header length into
account. As a result we could read outside of the buffer.

Check that we have at least the expected amount of data before we start
parsing.

PR:		278034
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44580

(cherry picked from commit 4848eb3af2)
2024-04-18 09:41:28 +02:00
Dimitry Andric 17e32453b8 Merge commit eb8f379567e8 from llvm-project (by Florian Hahn):
[DSE] Remove malloc from EarliestEscapeInfo before removing. (#84157)

  Not removing the malloc from earliest escape info leaves stale entries
  in the cache.

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

  PR: https://github.com/llvm/llvm-project/pull/84157

This fixes a crash in clang (usually a bus error, but can also be
another memory error) when compiling the science/siconos port.

PR:		278174
Reported by:	yuri
MFC after:	3 days

(cherry picked from commit aaabed1dea)
2024-04-08 09:42:20 +02:00
Xin LI 728293e74c Backport export of lzma_mt_block_size symbol.
This restores binary compatibility against liblzma 5.6.0 library.

PR:		278127

(cherry picked from commit 5ffb19ac36)
2024-04-07 21:06:13 -07:00
Xin LI 6b55e41b3f Revert "MFV: xz 5.6.0"
This commit reverts 8db56defa7,
rolling back the vendor import of xz 5.6.0 and restoring the
package to version 5.4.5.

The revert was not directly due to the attack (CVE-2024-3094):
our import process have removed the test cases and build scripts
that would have enabled the attack. However, reverting would
help to reduce potential confusion and false positives from
security scanners that assess risk based solely on version
numbers.

Another commit will follow to restore binary compatibility with
the liblzma 5.6.0 library by making the previously private
symbol (lzma_mt_block_size) public.

PR:		278127

(cherry picked from commit 2f9cd13d6c)
2024-04-07 21:06:12 -07:00
Ed Maste a2ce5a2dc9 tar: make error reporting more robust and use correct errno
Apply upstream pull request 2101.

(cherry picked from commit d68c68693e)
(cherry picked from commit bade279b81)
2024-04-07 12:58:50 -04:00
Dag-Erling Smørgrav 16349f296b Update tzcode to 2024a.
MFC after:	3 weeks
Sponsored by:	Klara, Inc.

(cherry picked from commit 46c599340f)
2024-04-04 11:47:10 +02:00
Cy Schubert 0fb7c4a38c hostapd: Work around lack of MLME support
hostap MLME uses Linux data structures and definitions not available
in FreeBSD. The ability for hostapd to select the frequency (channel)
depends Linux MLME, though strictly it's not required. Work around the
Linux MLME requirement to configure device frequency.

The detailed description is: hostapd will only set the channel (frequency)
when Linux MLME is configured. Enabling NEED_AP_MLME will result in
numerous build errors due do Linux data structures and definitions not
available under FreeBSD. The code to set the frequency from the selected
channel is only within the NEED_AP_MLME code path because without MLME,
hostapd_get_hw_features() is an inline that always returns -1 whereas with
MLME hostapd_get_hw_features() will obtain hardware features from the
kernel. Until such time we simply set the frequency as configured.

PR:		276375

(cherry picked from commit 84ed86380a)
2024-04-02 17:29:13 -07:00
Cy Schubert e59ac68e25 unbound: Vendor import 1.19.3
Release notes at
	https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/

Merge commit '5a33598e88ad8fbc0affa74dee0a2d8cc4010fbc' into main

(cherry picked from commit b7c0c8c18e)
2024-03-23 19:22:47 -07:00