From nobody Mon Aug 08 16:53:47 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 4M1j2g2TWbz4YW6n; Mon, 8 Aug 2022 16:53:47 +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 4M1j2g1ps0z3MXl; Mon, 8 Aug 2022 16:53:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659977627; 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=cg6PvP00GK3OORhMLf3O6jTyXPV+Ev5BVifmBrHFaDc=; b=FOfzegZILac6mIUs11jJ0o58Owsy7dTgh4AZ8InujWQw0Kiuw18QYafgu9T2frP/p0nbSm Nevx3gbiB3Y675Oam2F6Xrv6g99+kqmk9opUg2O5lqtx+DuqKS2M0mSijSwP7T0QmAl1Ps IA34/0r+4flsumbbfI7Asy+qMIyQBfBBD0Ubf2EJ3HzkyvPxp1SzNmWWCcj2C1sIHQb/b0 FWpH42oXsLtZ+tbslDbQUJq/DvW72ajDfsKjgqhkrbKhjmWgJIA34RPXwPLMb6KeyyYZ5F sJG8+BUe/pc759k0pQ7xbVZS+RuOd5E2jvDSjPbpwxHFrgCVlimjFircOc1/7w== 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 4M1j2g0v70zyxv; Mon, 8 Aug 2022 16:53:47 +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 278GrlGn019106; Mon, 8 Aug 2022 16:53:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 278Grlvq019105; Mon, 8 Aug 2022 16:53:47 GMT (envelope-from git) Date: Mon, 8 Aug 2022 16:53:47 GMT Message-Id: <202208081653.278Grlvq019105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cbd1e83154af - main - Merge libcxxrt commit 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbd1e83154af8bae3daa3919bb2746d587436515 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659977627; 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=cg6PvP00GK3OORhMLf3O6jTyXPV+Ev5BVifmBrHFaDc=; b=yIsQIqz2A1qJyVcqCxMdSCh0WH44leOYMqUSMo07jgsPAqGbB1P1CqYvfiXbq9ksT5kdnV 6GRjnFI+z3cqTkxXwucf2gr1dH00fecLBpcMQ1pdUwkgbssPyJBEN76yvX+ACkqvloE4Vu PTN7ilIlYdlOQcUlS6+NFaXP8/ANZ7icsam9yklT2yazj5Lq8/M3K23uR0vX6nSVqnRjYJ eaFtB86Z70S38PkNP+G7X0XQ/MEF8q2G/R5PucQMlaVQ2eDXeNrA1fk9W6EI9hFPagow1v 7E9GkN+Tfk0F1VWZIfQloTBRN8AdEJ3XstoiPZIi3H3BeL6NbMs9rbLDRMx03g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659977627; a=rsa-sha256; cv=none; b=BhKUzwGszS8N3NLyxsA5qD4R5uc+/44znetkLD7PheK4KYdsuVPRH83LrCSCqv/P1jE5LO bSKOSwGYWfZ6WA5VfTUQjlyTiC4zorVKWsCYTmAjO9szjZgZELjOtrhe/89fWNXOhr+8MT WB+XY7o04Oa5OtuqpKGIYAfIgbRu1hgjV2f4jZV6LD9XpuvKtEvGGEbOnk2CgFWqFNN1U7 ngmeinure9zsFzd06KwiupEaCebOrXDMu0spuZy4I7WzmCfvk2ncKkIkF/KiUPUnEzgYLU lb1q5gOtV2ZyBj+wzcq40CKqE58z6LW1vG0v00qxDFSai2j5pJ4DngIYihjACQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cbd1e83154af8bae3daa3919bb2746d587436515 commit cbd1e83154af8bae3daa3919bb2746d587436515 Author: Mark Johnston AuthorDate: 2022-08-08 16:30:56 +0000 Commit: Mark Johnston CommitDate: 2022-08-08 16:50:48 +0000 Merge libcxxrt commit 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd Fix two bugs in __cxa_end_cleanup() Per the EHABI32 specification, __cxa_end_cleanup must take care to preserve registers before calling _Unwind_Resume(). So, libcxxrt uses an assembly stub which preserves caller-saved registers around the call to __cxa_get_cleanup(). But: - it failed to restore them properly, - it did not preserve the link register. Fix both of these problems. This is needed to fix exception unwinding on FreeBSD with LLVM 14. Note that r4 is callee-saved but is pushed onto the stack to preserve stack pointer alignment. Sponsored-by: The FreeBSD Foundation MFC after: 1 week --- contrib/libcxxrt/exception.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index f28082ab7e80..6c5196876b10 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -1577,8 +1577,10 @@ asm ( ".type __cxa_end_cleanup, \"function\" \n" "__cxa_end_cleanup: \n" " push {r1, r2, r3, r4} \n" +" mov r4, lr \n" " bl __cxa_get_cleanup \n" -" push {r1, r2, r3, r4} \n" +" mov lr, r4 \n" +" pop {r1, r2, r3, r4} \n" " b _Unwind_Resume \n" " bl abort \n" ".popsection \n"