Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2024 14:51:50 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d9901a23bd2f - stable/14 - libcxxrt: Update to upstream 6f2fdfebcd62
Message-ID:  <202411031451.4A3EpoJU082396@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=d9901a23bd2f4e6aeef7f628f946134c4698fc38

commit d9901a23bd2f4e6aeef7f628f946134c4698fc38
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-10-31 15:51:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-11-03 14:51:37 +0000

    libcxxrt: Update to upstream 6f2fdfebcd62
    
    Interesting fixes:
    
    3cbfe5a556fe Avoid noreturn warning on terminate()
    
    (cherry picked from commit 2dccd21949f26b1bdf5e7cf258b760fffd3bf259)
---
 contrib/libcxxrt/exception.cc | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc
index c87fe5ac4468..5034809a1380 100644
--- a/contrib/libcxxrt/exception.cc
+++ b/contrib/libcxxrt/exception.cc
@@ -237,7 +237,7 @@ static_assert(offsetof(__cxa_dependent_exception, unwindHeader) ==
 
 namespace std
 {
-	void unexpected();
+	[[noreturn]] void unexpected();
 	class exception
 	{
 		public:
@@ -1530,28 +1530,34 @@ namespace std
 		if (0 != info && 0 != info->terminateHandler)
 		{
 			info->terminateHandler();
-			// Should not be reached - a terminate handler is not expected to
-			// return.
-			abort();
 		}
-		terminateHandler.load()();
+		else
+		{
+			terminateHandler.load()();
+		}
+		// Should not be reached - a terminate handler is not expected
+		// to return.
+		abort();
 	}
 	/**
 	 * Called when an unexpected exception is encountered (i.e. an exception
 	 * violates an exception specification).  This calls abort() unless a
 	 * custom handler has been set..
 	 */
-	void unexpected()
+	[[noreturn]] void unexpected()
 	{
 		static __cxa_thread_info *info = thread_info();
 		if (0 != info && 0 != info->unexpectedHandler)
 		{
 			info->unexpectedHandler();
-			// Should not be reached - a terminate handler is not expected to
-			// return.
-			abort();
 		}
-		unexpectedHandler.load()();
+		else
+		{
+			unexpectedHandler.load()();
+		}
+		// Should not be reached - a unexpected handler is not expected
+		// to return.
+		abort();
 	}
 	/**
 	 * Returns whether there are any exceptions currently being thrown that



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411031451.4A3EpoJU082396>