From nobody Mon Jul 21 16:56:10 2025 X-Original-To: toolchain@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 4bm63v6sXjz62sV0 for ; Mon, 21 Jul 2025 16:56:11 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm63t6S30z3MMW for ; Mon, 21 Jul 2025 16:56:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753116970; 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: in-reply-to:in-reply-to:references:references; bh=senT/75hH3hsinS4Y7xGJm0jqL7q2e+V12PhAc1nfMQ=; b=wztEXanL6qoKcIUHAJRnKil/3JvP/pDj/ipfXuJN6+87h4DhrAeTJ3t39TrKDVye0NFU5H ZHmMo3OvMnNChv50PMjAsFmMKRYRDj3zcMO5sjI4PCoWui8i8zCmdu4WeUQAUSJoQozetv 3YhWZfJXIKLq5kMSnRtIajHhfRsHAtUetMyjN+QCNlYTo4xQEcDX89UPo6Zf5IyEHw6S7x ZTKiV89EP2mupzLH64jTFDHzP4F1tKDEOvakp/Ed/6SMZrVBopsiCMslV+V3mDbXL8mieM kv5Zu11l5Cub+YC7adUOcJh6h5UWqLZPXhGtNZ8cAYtW0h4X8qJq5sl5o3BjIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753116970; 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: in-reply-to:in-reply-to:references:references; bh=senT/75hH3hsinS4Y7xGJm0jqL7q2e+V12PhAc1nfMQ=; b=F5DmPNbQQoB2iS7hTkLxtMbaFat7Bi/7bVjkaHPjUokXC/UWWlA4rA/QfrR3guHgvYT+mr hXVxYJSS/vse2Kcgc1IJryPitjEN8wUAhTrL6aSGVvUqMkOJUFO2iDL5VWtTW67yWcEWlZ Bym6HfMQ9XqF2fCdQ7MY0i7N4fpcHPBhUIUnn524q90b8IxDlSX49++XQjCqaNCLIrJFpg zzcQPPv5+EVkRTBhZDLWocWK6HnyfMIwrcgLvbVmthe5DUZIREQbGVpUS30fWUbRCJLSWb xhuguNtMYNNk6TYiDjhshwN+pdrpJFI4mNP3OgYV+9qrje2OIivK8KZcMl8O0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753116970; a=rsa-sha256; cv=none; b=Bon1iexRrlaT2VDgPbMM6Dr1SDHjUiZbi4TEubkbVLFM0lE6LFXYvSJqLQwMTXp7+nC+ae nntRmpyfC48PIUumIFhtdL8kFuICeJCCvkLCj8TUbqbjZhPvp48/RGjoBEiG4wma03pZnx 3XhsIkdKNsIz1lMSSJWGAlescYDbGqt2b38masF5Dkeo1qNyNjalJD5Uz07vbPzjVwhHkU rPOGZSP4HrOiqwyWsvTgWu3FAnvDs3PPYQrq4k+iWbwNxDXPqsmEAQshT4Y2OL/MAJIZsM 9cmPTRDQC6aSLpoOgJDuQBaazAwXPTTdlnch9VUeCxEakUDDMn/9wvAdOqr12Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4bm63t5Wjrz159N for ; Mon, 21 Jul 2025 16:56:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 56LGuART015613 for ; Mon, 21 Jul 2025 16:56:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 56LGuAlm015612 for toolchain@FreeBSD.org; Mon, 21 Jul 2025 16:56:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 288352] clang crash on devel/hpx while building tests Date: Mon, 21 Jul 2025 16:56:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-toolchain@freebsd.org Sender: owner-freebsd-toolchain@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D288352 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dffc5ee0f57d56459df93f4107b9835ae7= 8a546b5 commit ffc5ee0f57d56459df93f4107b9835ae78a546b5 Author: Dimitry Andric AuthorDate: 2025-07-21 16:55:23 +0000 Commit: Dimitry Andric CommitDate: 2025-07-21 16:55:23 +0000 Merge commit 8ac140f39084 from llvm git (by Younan Zhang): [Clang][NFCI] Cleanup the fix for default function argument substitut= ion (#104911) (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a function parameter. In that case, we would preserve the uninstantiated expression until after, e.g. building up a CXXDefaultArgExpr and instantiate the expression there. For member function instantiation, this algorithm used to cause a problem in that the default argument of an out-of-line member function specialization couldn't get properly instantiated. This is because, in `getTemplateInstantiationArgs()`, we would give up visiting a functio= n's declaration context if the function is a specialization of a member template. For example, ```cpp template struct S { template void f(T =3D sizeof(T)); }; template <> template void S::f(int) {} ``` The default argument `sizeof(U)` that lexically appears inside the declaration would be copied to the function declaration in the class template specialization `S`, as well as to the function's out-of-line definition. We use template arguments collected from the out-of-line function definition when substituting into the default arguments. We would therefore give up the traversal after the functio= n, resulting in a single-level template argument of the `f` itself. Howe= ver the default argument here could still reference the template paramete= rs of the primary template, hence the error. In fact, this is similar to constraint checking in some respects: we actually want the "whole" template arguments relative to the primary template, not those relative to the function definition. So this patch adds another flag to indicate `getTemplateInstantiationArgs()` for th= at. This patch also consolidates the tests for default arguments and remo= ves some unnecessary tests. This fixes a crash or assertion failure while building tests for the devel/hpx port. PR: 288352 MFC after: 3 days .../llvm-project/clang/include/clang/Sema/Sema.h | 9 ++++++++- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 23 ++++++++----------= ---- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++++++---- 3 files changed, 22 insertions(+), 20 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=