uVJQ R2Cv5Rsiy7gcqoClKPIzMdJ50kyTBUYJQhtgrBf3OA2PpuA22NtbbffQuU6uaOzVC9JM+n Bbaosyy3n77eMorxMrt4DWpqPe2PdtgBKgUYCZ2eBTSfL8gcQ47aaRokw+wbaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765810985; a=rsa-sha256; cv=none; b=IDWkTAuyUDRFs20cPzo8kLfOtRYKjEcDPAYKmBKP8vLI7K8967H8R8H88njCwaGs3N1gwn 9YGEeI30mNtCKWeSB5obtNnwFbHOruEQPe1RIizu8vVRdc1s4mEaSyNVC3sBL5vApEQJXj OBpGRm0ZQnJzNYSazzBzPJdbeW/geXjxqbJ3pEIyRq5Vg0CgGUQdtOIQj8wc/N7vuRuMFA sEY5B1h66h7iVtUK8iNok4JrODr081rSwwKjifPF6isxWJUEZp/cEiNn0ouc3pcwKX0vQn n1A2rOG4ExvUiLCJkkoeh/7G+zHoQ4MXay+oLTMc5tx2MR3HCOStMsNAmGPqxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVNbX6whWz8j7 for ; Mon, 15 Dec 2025 15:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a8be by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 15:03:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Ed Maste Subject: git: ca149d75e9bd - stable/15 - libc++: silence -Wnontrivial-memaccess warning with newer clang List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ca149d75e9bd6455abc3c74e7db160464cfabbdb Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 15:03:04 +0000 Message-Id: <69402328.3a8be.44f1a6d1@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ca149d75e9bd6455abc3c74e7db160464cfabbdb commit ca149d75e9bd6455abc3c74e7db160464cfabbdb Author: Alex Richardson AuthorDate: 2025-09-15 22:14:18 +0000 Commit: Ed Maste CommitDate: 2025-12-15 15:02:09 +0000 libc++: silence -Wnontrivial-memaccess warning with newer clang Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to silence the -Wnontrivial-memaccess warning that is triggered any time this function is instantiated by user code. This fixes another buildworld failure with Clang HEAD. Original commit message: [clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434) This implements a warning that's similar to what GCC does in that context: both memcpy and memset require their first and second operand to be trivially copyable, let's warn if that's not the case. Reviewed by: emaste, dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52534 (cherry picked from commit 34a006eaa39ceb6b0a96fa386c9b9b8a44681979) --- .../llvm-project/libcxx/include/__memory/uninitialized_algorithms.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h index 7475ef5cf85d..79cab80dcf73 100644 --- a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h +++ b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h @@ -642,7 +642,8 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _ __guard.__complete(); std::__allocator_destroy(__alloc, __first, __last); } else { - __builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first, sizeof(_Tp) * (__last - __first)); + // Casting to void* to suppress clang complaining that this is technically UB. + __builtin_memcpy(static_cast(const_cast<__remove_const_t<_Tp>*>(__result)), __first, sizeof(_Tp) * (__last - __first)); } }