Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: 盏一 <w(at)hidva(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL
Date: 2023-05-08 16:24:31
Message-ID: 79c2da26-e460-25bc-f307-aa9879fd8792@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08.05.23 04:38, 盏一 wrote:
> > It seems extremely specific to one particular C++ implementation
>
> To perform a force unwind during longjmp, the _Unwind_ForcedUnwind
> function is used. This function is defined in the [Itanium C++ ABI
> Standard](https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-throw), which is followed by all C++ implementations. Additionally, the glibc [nptl/unwind.c](https://elixir.bootlin.com/glibc/latest/source/nptl/unwind.c#L130) file shows that on all platforms, pthread_exit is also implemented using _Unwind_ForcedUnwind.
>
> Furthermore, the Itanium C++ ABI specification also defines
> _Unwind_RaiseException as the entry point for all C++ exceptions thrown.

I ran your patch through Cirrus CI, and it passed on Linux but failed on
FreeBSD, macOS, and Windows. You should fix that if you want to
alleviate the concerns about the portability of this approach.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2023-05-08 16:36:27 Re: Tab completion for CREATE SCHEMAAUTHORIZATION
Previous Message gkokolatos 2023-05-08 16:19:43 Re: Add LZ4 compression in pg_dump