From nobody Thu Jul 24 07:45:36 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 4bnjjF0LF5z6290J for ; Thu, 24 Jul 2025 07:45:37 +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 4bnjjD4g81z3rtw for ; Thu, 24 Jul 2025 07:45:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343136; 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=gCfjpJhXYeoVpJH+yJcc244TH7+Zn07nbcDyyVAFeRk=; b=M85t6YUss7OGtWuAWUr6AE1KkHeiRZrjMZl4WEcotqfqcWhUz2qutg2b7RFHn0ZwU70s2u JXFdP0UUI2tvScy4JdzGlYLxsURxE4jTHKbplSY+L7KnrPVwRkyFraabUq7kvGfJe3qQMM APZMByqXkNKmH80lZM+dlYGA8XQjRpxSR5shGU3lEMrcMooi5qOnEQgl9hW2Gp2g9BGKHx 2qyWsdpwRb+CouNt1LWzohe4ddYVw+30BVHP9KGN4Ms61YRA4yOnuiQ8JGl8r1u/K4JTgC h5NPYMK9jyccdiGxDb7oHZ9Xw+bfnOph8k37wcoMipOM0bhzb9VDuon5KwNaiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343136; 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=gCfjpJhXYeoVpJH+yJcc244TH7+Zn07nbcDyyVAFeRk=; b=kZM1chJT362fESW8LMnMXfhscnXJMU9TBc8zaLXFR6GtfS0qCzgnEB05Q9OgKfvcfS57Y0 HlcrFzCeHkpO29xCNj93d6xKpvYKOmemvCLIOj1cbzxQPFdtW41f7ucmhISd6LtH9cB8sX EE6fMbr5PIQYJyHrauWh3V6VvE2MS2n8/vIVuq5tQSDCd4j35+aO8JS2LZX2MhU9W27xKs 8SO4cx2cK3ikKfxmq3PZACUBnfRM3ysgcdTW37lV5R17rZB5eCvHsj0XO8AMxlVyLWXI7D dBQ830yhFfCEcjZNaa+5qHa6n8l4vlsrZVapesqNaB9hXTPW9Z/WgDCJA+8kng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753343136; a=rsa-sha256; cv=none; b=JTgCKoHuykhd1GbbfLvcOgIxjv0BmOc2cg5amvoJJQQ3VS2qY2vzmqUNNWORBt1rxaudKC hzjYNVgJCnwZc7bCK59WHS+Dd7nUM/zlhi7/pDJxV4iEyyCxFP2rTn0ZEmpyIYJgf5Iy2V cgJ2j/WECFEOOzRvgkZja1Dv3iawTiHRBVxjVJrgkVcwydbexCZ81mxyFrsShqwNHJrPME qZZUvw0gSPkj2YxDcwws/G/fMt2ysuEUI++H2gjDPK/lVUp4XGCRzaI/LJCIXPLApYOeZ/ ktXrYU/lFrVCezGhbHhy3wFLtGigmKYzPZVY+/etaghDh2IHeOTVMYJ/hewYQw== 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 4bnjjD4Gl6zqml for ; Thu, 24 Jul 2025 07:45:36 +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 56O7jaWM023375 for ; Thu, 24 Jul 2025 07:45:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 56O7jaC7023374 for toolchain@FreeBSD.org; Thu, 24 Jul 2025 07:45:36 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: Thu, 24 Jul 2025 07:45:36 +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: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: mfc-stable14+ mfc-stable13+ 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 #4 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dae7fdd715466490d91813179475ea103c= 8c8e30d commit ae7fdd715466490d91813179475ea103c8c8e30d Author: Dimitry Andric AuthorDate: 2025-07-21 16:55:23 +0000 Commit: Dimitry Andric CommitDate: 2025-07-24 07:44:45 +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 (cherry picked from commit ffc5ee0f57d56459df93f4107b9835ae78a546b5) .../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.=