From nobody Mon Sep 15 22:35:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfxW4K9Jz689Zf; Mon, 15 Sep 2025 22:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxW0Sywz3X45; Mon, 15 Sep 2025 22:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GP5PWxMNN7fG9Mj8rTGPsFM40X8nJcxA/rv5rg7XSuY=; b=axK8lLg/8MIJl+99zy7xp+rKsJp8jdO+pR5l9G0XbbGDNpqbRUBH4In9lHA/Bb3TT+peri g+JPPtPxsFnJ2bLCnGkc87rlgmWbK6AGAXoceNbiGCbKzd2simKNaqCaLFXfFYvBY4HWtG xdXAQkiwbpAWMLT2Hah+dNskR4AToib8cCntPEH6KSbmzt4oDddYkjwwQn0x9N1DnE3HaA eDzM2XgGNsOEVg2Z63qUA27OdiFhJEAmtYUr3GhxXXbgBQulPHtf9+Ujh/fvayVBve35KM gbaSiGRVSeciQSUsML+S+CO0/2rKsx7jVLxKwvqnFrnsNmzlMlU62ssFbS8gAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GP5PWxMNN7fG9Mj8rTGPsFM40X8nJcxA/rv5rg7XSuY=; b=M2AK2fLyFFOd7e2VSpGxUcTG1SNAYwVnm6wj1NH3/WZOhZ3nMgh6koRaNOgRRpiN5RJULn 4/DNjOLIjGQQuZvATylHXKLg54On04JmokNofnAcjBO0UhBD+sthp1yQ8MfdU8FAROBDAA qbrciDQYhVvQiO3vXIeBK5jdyMCtUxAVk/IP/79v+zV1J2rQlYkKbfxskNzl/TSbiBOQ6G klWoQcSR2N3jKDKtbAkIRywP/mGLymqW2CjK0nMS80hjq5uGcB6jO+zWkXiO2LxKfBYGsa rINnzLhLPCnmEiK5ecNSk0liVZZCYy2mq9uCspaQOtjP1wP//zpNzmnWSnXc/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975727; a=rsa-sha256; cv=none; b=HipMfrkajIe0IIuTpyI+mEpCMRbZS2ZEMQQENixV5YPsbq4ju9umZsqM5I/Hsj029fiF7/ t1PdxspGzEr+R12P7Zk/aO6wvuT6IKW8bsdTyJiISWewHJTJ/JWUTk1wRdAhgMA4MCvZOV 7Yh7hjLsL+U/CbYu8PGq1o1vx0UO8nqR5o626RPcznbD5K3w/flrciqJiIVzfY3ssMZ1MY x0jGXQ7KY+QYtqyz5fiu//weRUy4uHT+FJa+L71o0LzeIMwnoD4VtcEZbm6GjTlMIV4jnS VDLu2h/WU8EbNxmH8pCXaG97tsYUiWKzzEnMHrMpaLc1qtasCJr+jEeRGGnOWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cQfxV6mFFz1Cl2; Mon, 15 Sep 2025 22:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZQqC031353; Mon, 15 Sep 2025 22:35:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZQjR031350; Mon, 15 Sep 2025 22:35:26 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:26 GMT Message-Id: <202509152235.58FMZQjR031350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 34a006eaa39c - main - libc++: silence -Wnontrivial-memaccess warning with newer clang List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34a006eaa39ceb6b0a96fa386c9b9b8a44681979 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=34a006eaa39ceb6b0a96fa386c9b9b8a44681979 commit 34a006eaa39ceb6b0a96fa386c9b9b8a44681979 Author: Alex Richardson AuthorDate: 2025-09-15 22:14:18 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:14:18 +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 --- .../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)); } }