Commit graph

9823 commits

Author SHA1 Message Date
Simon J. Gerraty 9d3df31ec0 Merge bmake-20240520
Merge commit '29efb3dcaedd9cbabc6f96f35545baf2c8b28501'
2024-05-23 13:12:43 -07:00
Dag-Erling Smørgrav 974ea6b297 libdiff: Detect and recover from file truncation.
If a memory-mapped file is truncated before we get to the end, the
atomizer may catch SIGBUS.  Detect that, reduce the input length to
what we were actually able to read, and set a flag so the caller can
take further action (e.g. warn the user and / or start over).

Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D45217
2024-05-20 15:26:33 +02:00
Dimitry Andric fcfb2d6393 Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang):
[X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (#91694)

This prevents problems with ports that fail to build with
CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors
like:

  /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512'
    197 |         const vec_t ones = VSET1_8(1);
        |                            ^
  /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8'
    116 | #  define VSET1_8(a)            _mm512_set1_epi8(a)
        |                                 ^
  /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI
  /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8'
    116 | #  define VSET1_8(a)            _mm512_set1_epi8(a)
        |                                 ^

Ports known to be affected are: archivers/libdeflate, devel/highway,
www/node20, and lang/rust.

(For rust itself there is also a similar issue reported at
https://github.com/rust-lang/rust/pull/121088).

PR:		276104
Reported by:	netchild
MFC after:	3 days
2024-05-16 20:41:45 +02:00
Alexander Ziaee 1a720cbec5 man filesystems: fix xrefs after move to section 4
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
2024-05-16 10:25:29 -06:00
Alfonso S. Siciliano a6d8be451f
contrib/bsddialog: Import version 1.0.2
Implicitly import also 1.0.1, both versions are for fixing and
feature requests.

Fixing:
Change --mixedform behavior to fix a bsdinstall fault avoiding
to change the command line in wlanconfig.

Feature requests:
 * Add keys to navigate menus.
 * Add key to redraw dialogs.
 * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.

See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
/usr/src/contrib/bsddialog/CHANGELOG for more detailed information.

PR:			274472
Differential Revision:	D42380

Merge commit 'be8846bd9e069f4a6bea3d769005bea96cf43990'
2024-05-16 15:32:56 +02:00
Dag-Erling Smørgrav 3b092e4936 ldns: Ignore commented-out lines in resolv.conf.
This merges upstream PR 238 + an additional bug fix.

PR:		278721
MFC after:	1 week
2024-05-15 12:20:15 +02:00
Dag-Erling Smørgrav 154ad8e0f8 Revert "Issue #237 : Resolver uses nameserver commented out in /etc/resolv.conf"
This reverts commit b5fb1f44ed.
2024-05-15 12:10:20 +02:00
Dag-Erling Smørgrav a7beca6fb1 atf: Guard against multiple evaluation.
Note that the ATF-C++ macros have the same issue, but they are not as
easily fixed.

MFC after:	3 days
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D45148
2024-05-15 12:08:44 +02:00
Willem Toorop b5fb1f44ed Issue #237 : Resolver uses nameserver commented out in /etc/resolv.conf
This /etc/resolv.conf:
    # x

    # nameserver 8.8.8.8

Still configured 8.8.8.8 as nameserver, because the comment detection in `ldns_resolver_new_frm_fp_l()` didn't anticipate empty lines before the comment.
This fix removed all comment handling from `ldns_resolver_new_frm_fp_l()`. Instead a new function is introduced `ldns_fget_token_l_resolv_conf()` that skips comments that start with '#' and ';'. The old `ldns_fget_token_l()` (that is used for zonefiles too) still accepts only ';' for comments.
2024-05-15 11:52:49 +02:00
Warner Losh eb690a0576 awk: Merge in bsd-feature branch of OTA from 20240422 (31bb33a32f71)
In the last 2nd edition import, I mistakenly grabbed from the 'main'
branch of upstream rather than the bsd-feature branch. This means that
we have a regression in awk from that point forward: all the
BSD-specific bit functions (and a few others) were dropped. This
restores it at the same level.

MFC After:		1 day
Sponsored by:		Netflix
2024-05-14 12:17:55 -06:00
Simon J. Gerraty c9f4001f81 Merge bmake-20240508
Merge commit '3c2ab5fddc576e58f3ffa70dc5fa95144646a513'
2024-05-13 22:19:20 -07:00
Kyle Evans e55512504d Prepare the system for _FORTIFY_SOURCE
Notably:
- libc needs to #undef some of the macros from ssp/* for underlying
  implementations
- ssp/* wants a __RENAME() macro (snatched more or less from NetBSD)

There's some extra hinkiness included for read(), since libc spells it
as "_read" while the rest of the world spells it "read."

Reviewed by:	imp, ngie
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D32307
2024-05-13 00:23:50 -05:00
Cy Schubert 335c7cda12 unbound: Vendor import 1.20.0
Release notes at
	https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:	The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main
2024-05-10 14:23:43 -07:00
Cy Schubert c2a8005686 unbound: Vendor import 1.20.0
Release notes at
	https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:	The DNSBomb vulnerability CVE-2024-33655
2024-05-10 13:48:53 -07:00
Justine Tunney 12be6f12e8 Fix memory corruption in C++ demangler
The __cxa_demangle_gnu3() and cpp_demangle_gnu3() functions segfault on
various libcxxabi test cases due to a copy and paste error. This change
fixes that.

This is a subset of https://github.com/libcxxrt/libcxxrt/pull/34 which
fixes the immediate problem.

Reviewed by: imp, emaste (I think)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1222
2024-05-09 19:55:52 -06:00
Adrian Chadd 491938d743 wpa: Remove the now not-needed local logic to hard-code cipher support
A previous commit now exposes the supported net80211 ciphers for the
given NIC, rather than the hardware cipher list.  This is going to be
especially important moving forward when we add more cipher and key
management support.

Differential Revision:	https://reviews.freebsd.org/D44821
2024-05-08 17:48:58 -07:00
Dimitry Andric 22b3e7898e Merge commit 73bb8d9d92f6 from llvm-project (by Jonathan Peyton):
[OpenMP] Fix child processes to use affinity_none (#91391)

  When a child process is forked with OpenMP already initialized, the
  child process resets its affinity mask and sets proc-bind-var to false
  so that the entire original affinity mask is used. This patch corrects
  an issue with the affinity initialization code setting affinity to
  compact instead of none for this special case of forked children.

  The test trying to catch this only testing explicit setting of
  KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting.

  Fixes: #91098

This should fix OpenMP processes sometimes getting stuck on a single CPU
core.

PR:		278845
Reported by:	Cassidy B. Larson <cbl@cbl.us>
MFC after:	3 days
2024-05-08 20:45:45 +02:00
Dimitry Andric da15ed2e98 Merge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):
[OpenMP] Fix re-locking hang found in issue 86684 (#88539)

  This was initially reported here (including stacktraces):
  https://stackoverflow.com/questions/78183545/does-compiling-imagick-with-openmp-enabled-in-freebsd-13-2-cause-sched-yield

  If `__kmp_register_library_startup()` detects that another instance of
  the library is present, `__kmp_is_address_mapped()` is eventually
  called. which uses `kmpc_alloc()` to allocate memory. This function
  calls `__kmp_entry_thread()` to access the thread-local memory pool,
  which is a bad idea during initialization. This macro internally calls
  `__kmp_get_global_thread_id_reg()` which sets the bootstrap lock at the
  beginning (before calling `__kmp_register_library_startup()`).

  The fix is to use `KMP_INTERNAL_MALLOC()`/`KMP_INTERNAL_FREE()` instead
  of `kmpc_malloc()`/`kmpc_free()`. `KMP_INTERNAL_MALLOC` and
  `KMP_INTERNAL_FREE` do not use any bootstrap locks. They just translate
  to `malloc()`/`free()` and are meant to be used during library
  initialization before other library-specific allocators have been
  initialized.

  Fixes: #86684

This should fix OpenMP processes sometimes getting locked with 100% CPU
usage, endlessly calling sched_yield(2).

PR:		278845
Reported by:	Cassidy B. Larson <cbl@cbl.us>
MFC after:	3 days
2024-05-08 20:45:44 +02:00
Brooks Davis 2a32b54a57 ofed: don't expose symbols twice
ibv_init_wq and ibv_cleanup_wq are made visible with the
default_symver which puts them in the IBVERBS_1.1 ABI.  Don't
try to expose them as IBVERBS_PRIVATE_14 symbols as GNU ld
complains with --no-undefined-symbol.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D45090
2024-05-08 15:52:00 +01:00
Warner Losh 1023317ac4 ota: Merge one true awk 20240422 (a3b68e649d2d)
Apr 22, 2024:
	fixed regex engine gototab reallocation issue that was
	introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
	Fixed a scan bug in split in the case the separator is a single
	character. thanks to Oguz Ismail for spotting the issue.

Mar 10, 2024:
	fixed use-after-free bug in fnematch due to adjbuf invalidating
	the pointers to buf. thanks to github user caffe3 for spotting
	the issue and providing a fix, and to Miguel Pineiro Jr.
	for the alternative fix.
	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
	thanks to Miguel Pineiro Jr.

Sponsored by:		Netflix
2024-05-04 15:50:33 -06:00
Ed Maste 60a517b66a libfido2: update to 1.14.0
Sponsored by:	The FreeBSD Foundation
2024-05-04 12:51:08 -04:00
Dimitry Andric 5678d1d98a Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9.

PR:		276104
MFC after:	3 days
2024-05-04 17:44:49 +02:00
Ed Maste abd872540f libcbor: vendor update to 0.11.0
Sponsored by:	The FreeBSD Foundation
2024-05-03 19:33:50 -04:00
Simon J. Gerraty 548bfc56eb Merge bmake-20240430
Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5'
2024-05-03 15:48:32 -07:00
Dag-Erling Smørgrav b95e96028e libdiff: More type issues.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45080
2024-05-03 18:32:41 +02:00
Dag-Erling Smørgrav 0549218b43 libdiff: Fix type issues.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D45077
2024-05-03 17:03:50 +02:00
Martin Matuska c0b58e65de 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)

MFC after:	3 days
2024-04-30 11:55:01 +02:00
Kristof Provost 5824df8d99 pf: convert DIOCGETSTATUS to netlink
Introduce pfctl_get_status_h() because we need the pfctl_handle. In this variant
use netlink to obtain the information.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-04-29 16:32:23 +02:00
Kristof Provost 044243fcc9 libpfctl: allow access to the fd
pfctl_open() opens both /dev/pf and a netlink socket. Allow access to the /dev/
pf fd via pfctl_fd().
This means that libpfctl users no longer have to open /dev/pf themselves for any
calls that are not yet available in libpfctl.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
MFC after:	2 weeks
2024-04-29 16:32:23 +02:00
Martin Matuska 13d826ff94 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:		278588 (exp-run)
MFC after:	1 day
2024-04-29 10:17:53 +02:00
Dimitry Andric f08bf5a3ac 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
2024-04-25 18:47:47 +02:00
Ricardo Branco cae336280b 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
MFC after:	3 days
2024-04-23 22:33:26 -07:00
Dimitry Andric dfa39133b3 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
2024-04-20 16:02:57 +02:00
Martin Matuska 701d0666c0 libarchive: fix null format string error in tests (unbreaks gcc13 build)
Obtained from:	libarchive (d43c39247)
MFC after:	1 week
2024-04-17 09:37:04 +02:00
Martin Matuska b9128a37fa 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

PR:		278315 (exp-run)
MFC after:	1 week
2024-04-16 23:39:31 +02:00
Dimitry Andric 514c98ba14 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
2024-04-15 18:30:29 +02:00
Dimitry Andric 8b181c2fba 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
2024-04-14 19:40:12 +02:00
Dimitry Andric 2365f01295 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
2024-04-13 10:45:15 +02:00
Dimitry Andric 78d3648e73 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
2024-04-11 23:16:36 +02:00
Martin Matuska a509d68f27 Update vendor/libarchive to 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

Obtained from:		libarchive
Libarchive commit:	4fcc02d906cca4b9e21a78a833f1142a2689ec52
2024-04-11 15:48:20 +02:00
Dimitry Andric 439352ac82 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
2024-04-06 22:14:34 +02:00
Dimitry Andric 49a6e426df 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
2024-04-06 22:14:31 +02:00
Dimitry Andric ce4f1f49e0 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
2024-04-06 22:14:31 +02:00
Dimitry Andric 4c2d3b022a 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
2024-04-06 22:14:25 +02:00
Dimitry Andric 56727255ad 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
2024-04-06 22:14:19 +02:00
Dimitry Andric 74626c16ff 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
2024-04-06 22:14:13 +02:00
Dimitry Andric b3edf44679 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
2024-04-06 22:14:07 +02:00
Dimitry Andric 868ee3f285 [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
2024-04-06 22:14:03 +02:00
Dimitry Andric dc36515b62 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
2024-04-06 22:14:02 +02:00
Dimitry Andric ddbac700c2 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
2024-04-06 22:14:01 +02:00