Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL
Date
Msg-id 79c2da26-e460-25bc-f307-aa9879fd8792@enterprisedb.com
Whole thread Raw
In response to Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL  ("盏一" <w@hidva.com>)
Responses Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL
List 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_exitis 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.




pgsql-hackers by date:

Previous
From: gkokolatos@pm.me
Date:
Subject: Re: Add LZ4 compression in pg_dump
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Tab completion for CREATE SCHEMAAUTHORIZATION