From nobody Sun Jan 30 20:41:53 2022 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 5E63319939FB; Sun, 30 Jan 2022 20:41:53 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jn35Y2FWtz4VtR; Sun, 30 Jan 2022 20:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643575313; 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=1a0WJFsG1cXGvJpAvFiYuGLlLhwm8W4rv9/hNfp8R+g=; b=yfRRSYq/Xeltq0eqKnP2gHP647FT0qEjwwNH3m1sK9caFxS4CQOOGCzAeDooJsvW3t6Pu+ eDOkwWniCm23x97Uu1XzEOBHgxT1vCbB4HLat58z5pOXLVqbC2Qm8jTuXO8XpPsqTOCo49 IUzaSMzqCHGc10mbMUaAL2yZ2wWJHCRKd1ujUo0THMinRWE4uTMVGhEkzHOmrMBYrt6l1c moqMAe/y02doMWABYWyXUkJ1G8ppRAIjqp1dgJPkKyj4alMZuCb+7I6XP+gtPpKj6eZqvA QcVew9UTVdVl77EsB487U0tH2+rTKq9uS5xWtzRa6g1ct6dJCEzRTIgwrURDEg== 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 22A037B0D; Sun, 30 Jan 2022 20:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20UKfrgS027013; Sun, 30 Jan 2022 20:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20UKfr8U027012; Sun, 30 Jan 2022 20:41:53 GMT (envelope-from git) Date: Sun, 30 Jan 2022 20:41:53 GMT Message-Id: <202201302041.20UKfr8U027012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: fdf278410104 - main - Apply clang fix for assertion failure compiling science/chrono 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdf27841010464ad65c8791077a07000cdb01013 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643575313; 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=1a0WJFsG1cXGvJpAvFiYuGLlLhwm8W4rv9/hNfp8R+g=; b=V00TXWaMJBuCeAAcvWzYHnxyaULx4nMkjW8gePe+WiitMoMVmtTfe5D1foGM+KmXGTPhIY 73VKcGKUe6bmkt8KHXWVCrMP3jiwSpOvUN+E1cjEnXpoPJp2Rc9W6H2XBCRqj6Mu6pMW7n 6aJd3fW5IA3uYANOxqtQ8TlyCvIz9kezFEACqSY6K/DNYK4lzabymAe99sMfBtgGPVi7m0 ALGoCkC/1034xWCV3leoYFw4WI9TxT/PvujDE0FNepQzZw2OfPNTwV5NZA/QGzygOJwxe1 nQt+L76eypxTi9FGHdi3Ym40I5LNMBXva4gxnlqIUDRBJ2NjxcfNmlLfReigHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643575313; a=rsa-sha256; cv=none; b=qxeZDJELw0HnOh8Af8VGWMycmz5UsShq/uKoatM4HxhdhRqC3pU8kavYu6Tu0d5LswPAaW MY2yyXsaxclY4v+m4oyALM7oKwAAjLpoyal6OZG4aNGWaDPowQa/ZLn2CFQJjTmKP/g/dW SoqDr0pMr9Ttx05DonMLf52ef6H3j4Q2e3kdiy3cjpa7BwY3pDtmv2xehtNlh8jGTQpRWu dNf9BObqgxGYOFkgQViDufVw88H3OFkjMdiAuzgjrSKDqrQM184/6SbeJqe3FeWM6I8qIt +/XBtjOTvgxki7vVmZLnqsAAoINetYj1zvmeX6aNWg+CjUfMSZe4Kr5oPPaqHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fdf27841010464ad65c8791077a07000cdb01013 commit fdf27841010464ad65c8791077a07000cdb01013 Author: Dimitry Andric AuthorDate: 2022-01-30 20:41:24 +0000 Commit: Dimitry Andric CommitDate: 2022-01-30 20:41:37 +0000 Apply clang fix for assertion failure compiling science/chrono Merge commit 6b0f35931a44 from llvm git (by Jennifer Yu): Fix signal during the call to checkOpenMPLoop. The root problem is a null pointer is accessed during the call to checkOpenMPLoop, because loop up bound expr is an error expression due to error diagnostic was emit early. To fix this, in setLCDeclAndLB, setUB and setStep instead return false, return true when LB, UB or Step contains Error, so that the checking is stopped in checkOpenMPLoop. Differential Revision: https://reviews.llvm.org/D107385 Note this only fixes the assertion reported in bug 261567; some other tweaks for port dependencies are probably still required to make it build to completion. PR: 261567 MFC after: 3 days --- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp index c0cd2bf18a77..fc05f040b0d4 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp @@ -7342,7 +7342,7 @@ bool OpenMPIterationSpaceChecker::setLCDeclAndLB(ValueDecl *NewLCDecl, // State consistency checking to ensure correct usage. assert(LCDecl == nullptr && LB == nullptr && LCRef == nullptr && UB == nullptr && Step == nullptr && !TestIsLessOp && !TestIsStrictOp); - if (!NewLCDecl || !NewLB) + if (!NewLCDecl || !NewLB || NewLB->containsErrors()) return true; LCDecl = getCanonicalDecl(NewLCDecl); LCRef = NewLCRefExpr; @@ -7365,7 +7365,7 @@ bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, // State consistency checking to ensure correct usage. assert(LCDecl != nullptr && LB != nullptr && UB == nullptr && Step == nullptr && !TestIsLessOp && !TestIsStrictOp); - if (!NewUB) + if (!NewUB || NewUB->containsErrors()) return true; UB = NewUB; if (LessOp) @@ -7380,7 +7380,7 @@ bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) { // State consistency checking to ensure correct usage. assert(LCDecl != nullptr && LB != nullptr && Step == nullptr); - if (!NewStep) + if (!NewStep || NewStep->containsErrors()) return true; if (!NewStep->isValueDependent()) { // Check that the step is integer expression.