From nobody Sat Apr 06 20:18:25 2024 X-Original-To: dev-commits-src-main@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 4VBmrd4qnQz5HGqQ; Sat, 6 Apr 2024 20:18:25 +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 4VBmrd2CHkz4LFv; Sat, 6 Apr 2024 20:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712434705; 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=1EKPu8EnHI2DHEtAOFFi1pIRJ41b/v7W0wgZc2Fkpnc=; b=x7RNbwVhAYfkebzVNi2+v8/7QsLbgEsfrX38fxKArsVvIBaUZ2O3tTjzP2FEq6jATjrRhJ Ffu+zJv74ZFV2lXEGZJ/16oYBAu3Ro/m9MlhGQivOej0mAyOXnbG4qR5trDypXXrsH+a1N 6mBFH4CrUTVby/Lt+d+LCxQYLaAEOLUiApfAhxa9QscIR6QotzoWZ6YAAatSmv2MBu4/Ay 4mSwziYWgL8HOb4YXdsLcEtT6Lt3Y5Wn9Q/jf30WjutIQf9JlNoG9WhX6PRCkXXxILzV6s oe61GKSymCLNh6mZZ0l8oe/g1vvH2kNqn9SYDQDLw6PIkU+PXGYz+2j5Dan5gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712434705; a=rsa-sha256; cv=none; b=cBl/yP8PdIoIZzasU7AqircJuTRyqnGJZ5Nf+6SXX+XGPNJ+Om5JwLUzZUbkA9+5pEG7qP bfyGPanUT3w7aEFFyMNanyG40bdI6THNiCK+j7kr1PruaJ80MduQHetlJB7gwHqu/CT8Lg FVQLXXl3Dsr5v2Xux+pmI2yvnrz+Ct9D1/oSSF/VDdNXojYCk4/auvm3Pg5CCeYOOY4FZK 2wIiAX7pJOkKk/R5Is26pDn7rcG+/fg9HdRl4BYx82wQVPxaKNf+KlksZJ2wpLhKUP7qfA 6inUmqkVn62tyVlpQTiHDc1aQx3ezHjW2MpNj2PetT8eNuNARxtAvgJ5mS420A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712434705; 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=1EKPu8EnHI2DHEtAOFFi1pIRJ41b/v7W0wgZc2Fkpnc=; b=I9Yrpt9YNmYxhEs66th4sEzoAM1UvQNOphyyk/AGg+CLMAa5iYHuz6Rs8IvYZ086v+aNK5 QCWqZYtiUvMzVuDHpVUepw3HbtCvTS/OJOFyhlOKzuut72VkpA8tD00klUhctSvxMrnG44 zvqQ2+uClO/9wdRjtB0h2yXILA7ysISGX9oeEbztBkwg5hx71Nc/OIWVSka0S3AQWp3TGB OCRMV1n1m9rlae1fj4dyLF2bhgXuk1SMfkxllD9pWH9DK50UllU4wtPeM97k2n8VNVb/Bm lsadQ3NFgwm6pi4GC5M3kpZAZ+XVIddo84plks/IPq2iUfREqP8s+hrBKHPBgA== 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 4VBmrd1qS8zxgF; Sat, 6 Apr 2024 20:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 436KIPIJ029857; Sat, 6 Apr 2024 20:18:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 436KIPT8029854; Sat, 6 Apr 2024 20:18:25 GMT (envelope-from git) Date: Sat, 6 Apr 2024 20:18:25 GMT Message-Id: <202404062018.436KIPT8029854@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: 3fb2e045791e - main - Tentatively apply https://github.com/libcxxrt/libcxxrt/pull/27 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 3fb2e045791eb6f003205902cdc4f74702770ec6 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3fb2e045791eb6f003205902cdc4f74702770ec6 commit 3fb2e045791eb6f003205902cdc4f74702770ec6 Author: Dimitry Andric AuthorDate: 2024-01-26 15:03:20 +0000 Commit: Dimitry Andric CommitDate: 2024-04-06 20:13:54 +0000 Tentatively apply https://github.com/libcxxrt/libcxxrt/pull/27 This marks __cxa_allocate_exception, __cxa_free_exception and __cxa_init_primary_exception noexcept, to ensure compatibility with libc++'s declarations. PR: 276104 MFC after: 1 month --- contrib/libcxxrt/cxxabi.h | 6 +++--- contrib/libcxxrt/exception.cc | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/libcxxrt/cxxabi.h b/contrib/libcxxrt/cxxabi.h index e021f85c905a..ef4076a08a0a 100644 --- a/contrib/libcxxrt/cxxabi.h +++ b/contrib/libcxxrt/cxxabi.h @@ -204,12 +204,12 @@ __cxa_eh_globals *__cxa_get_globals_fast(void); std::type_info * __cxa_current_exception_type(); -void *__cxa_allocate_exception(size_t thrown_size); +void *__cxa_allocate_exception(size_t thrown_size) throw(); -void __cxa_free_exception(void* thrown_exception); +void __cxa_free_exception(void* thrown_exception) throw(); __cxa_exception *__cxa_init_primary_exception( - void *object, std::type_info* tinfo, void (*dest)(void *)); + void *object, std::type_info* tinfo, void (*dest)(void *)) throw(); /** * Throws an exception returned by __cxa_current_primary_exception(). This diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index b1659c902f56..35ff997dd445 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -121,7 +121,7 @@ static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex } -extern "C" void __cxa_free_exception(void *thrown_exception); +extern "C" void __cxa_free_exception(void *thrown_exception) throw(); extern "C" void __cxa_free_dependent_exception(void *thrown_exception); extern "C" void* __dynamic_cast(const void *sub, const __class_type_info *src, @@ -611,7 +611,7 @@ static void free_exception(char *e) * emergency buffer if malloc() fails, and may block if there are no such * buffers available. */ -extern "C" void *__cxa_allocate_exception(size_t thrown_size) +extern "C" void *__cxa_allocate_exception(size_t thrown_size) throw() { size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); @@ -633,7 +633,7 @@ extern "C" void *__cxa_allocate_dependent_exception(void) * In this implementation, it is also called by __cxa_end_catch() and during * thread cleanup. */ -extern "C" void __cxa_free_exception(void *thrown_exception) +extern "C" void __cxa_free_exception(void *thrown_exception) throw() { __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; // Free the object that was thrown, calling its destructor @@ -794,7 +794,7 @@ static void throw_exception(__cxa_exception *ex) } extern "C" __cxa_exception *__cxa_init_primary_exception( - void *object, std::type_info* tinfo, void (*dest)(void *)) { + void *object, std::type_info* tinfo, void (*dest)(void *)) throw() { __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(object) - 1; ex->referenceCount = 0;