From nobody Wed Feb 02 20:53:07 2022 X-Original-To: dev-commits-src-branches@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 9F1C319A1925; Wed, 2 Feb 2022 20:53:07 +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 4JpvC747bNz4YTM; Wed, 2 Feb 2022 20:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643835187; 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=ZzjKAHovSFySD0PWugb+MAHm24E4OIKWeFGS8V4armE=; b=EZ7yl07aUkQp3iE+WRjK722ZrtxITcYP75e+i0clJW6LH/nmRDh8rd3FLzW5hHaNjkz/Ul h4Zhq4kiwP3NdWw0yl51i9U0Y8Kp1ujuB3FFsYh88gic2Oe90tc/2hYYQt5ewnp6gKUorO 4hvyA01XfOscnmoWCva+yfhJVSfGfa2QJJ4MP5Oo6BL0vVwXRRfTuytjImwG5Uk3o+xug5 Eci+WbG1L8z7Ng4L7+eDU8+v+7+sWAvdOcEiD0hGqDdU5NQfxgp6biHt5cEpa8HMWCgf+B bXeEiLFvIQgEd/fti1Mkp7p5rC6incVFrh40RGOzMotSobKIOEIQPUWl1SoKzg== 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 6ECC12FCD; Wed, 2 Feb 2022 20:53:07 +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 212Kr7KR017902; Wed, 2 Feb 2022 20:53:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 212Kr7P4017900; Wed, 2 Feb 2022 20:53:07 GMT (envelope-from git) Date: Wed, 2 Feb 2022 20:53:07 GMT Message-Id: <202202022053.212Kr7P4017900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 40b816bd4f08 - stable/13 - Apply clang fix for assertion failure compiling science/chrono 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 40b816bd4f0861ca4df717f255347a21e77d4379 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643835187; 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=ZzjKAHovSFySD0PWugb+MAHm24E4OIKWeFGS8V4armE=; b=eKrhardmkhMqvanteyGfSo8s5CEd45IDxb6Y0Qz8kLlnt0sp709txtFkDKaLOyuzWYhBDT qZL+WFIaBSxEaNJ+HLnFVdemtYfKQac8h2iiy1OH1tPYaONMgJax1XHrX9nOXIfvggKM0p B/WhR+6Z5PmcyhijjRs2kHQe3indVhrmBo3uotTCjpfBGlbiQfRZ1V5UU/k3w2anQg4nYH LaeN8/a4JouOGPj2PHo89pjmIhWGvZtac880GjUbta+eK1EomZUSz2+YsUJiYtHmL/31gt 9VdebHJcp/JXNE1UNBYQB2uOsBGiKosSWZFSvchFpDxh93xMrxs6KW0NG+7AKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643835187; a=rsa-sha256; cv=none; b=ZJLCzgXEQZ0ux0a088NCVNhtEucmCPhseg7ZTlCpwVRLKSLkFiQY9c8iHD2z/Uh21LX1H6 cABtM07AKfn5Ut5rHiy1MItdQcUGimEa7p8pp5EXLj3+avl1vtMIipZ5a3nGHBXF0RlGaq elRzbco08g+sfAT2Q5pnUTyyzrXhkmcCRhgJq2X51akQUy1c5OntqvvXtFo8nyNrEtXMlA yCrQ96R6ZkA43D031sRta/HJKot3j46gP+/IKxDtaKIuN3MhbmPyYsN96iu6p2ElCX2uZO Ohwbef0hnUYfUkLUX6YC/W5jS+VOtVaesBesRRovCyu7akDEa/iZgeAFjbAqYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=40b816bd4f0861ca4df717f255347a21e77d4379 commit 40b816bd4f0861ca4df717f255347a21e77d4379 Author: Dimitry Andric AuthorDate: 2022-01-30 20:41:24 +0000 Commit: Dimitry Andric CommitDate: 2022-02-02 20:51:40 +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 (cherry picked from commit fdf27841010464ad65c8791077a07000cdb01013) --- 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.