From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B42FC1F56A for ; Sat, 9 Sep 2023 12:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1694260903; bh=i/jSqpSJ08+W+Acr4boXWPSMVXOjR+lroVWNxL3ErIs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y0k9KQLThRPl1yxAP8mkSwDlVn/4F9zgdSMHF7ZxXdRjqRGI/ug8LdJsuyjE8N4mZ MzqQutD0fwxNH9SmTGvwkZ4m7bM12HpDJkutJT87FzfKtNz9KRFVyNe1pnzuUfo9/G lYsu4GyBP0Li3xDlHpyTs/U568qZtZcr1UEwVZgU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/8] xap_helper: note __cleanup__ works with C++ exceptions Date: Sat, 9 Sep 2023 12:01:40 +0000 Message-ID: <20230909120142.1041752-7-e@80x24.org> In-Reply-To: <20230909120142.1041752-1-e@80x24.org> References: <20230909120142.1041752-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: In case somebody reviewing this code gets curious. --- lib/PublicInbox/xap_helper.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 70760367..3f45e1c7 100644 --- a/lib/PublicInbox/xap_helper.h +++ b/lib/PublicInbox/xap_helper.h @@ -322,6 +322,9 @@ struct dump_roots_tmp { int root2id_fd; }; +// n.b. __cleanup__ works fine with C++ exceptions, but not longjmp +// Only clang and g++ are supported, as AFAIK there's no other +// relevant Free(-as-in-speech) C++ compilers. #define CLEANUP_FBUF __attribute__((__cleanup__(fbuf_ensure))) static void fbuf_ensure(void *ptr) {