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

From: 盏一 <w(at)hidva(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(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-09 14:12:28
Message-ID: tencent_7BE1BAE80365761411891DFE@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I apologize for my previous hasty conclusion. I have conducted further testing on different platforms and would like to share my findings.

> FreeBSD

Based on my tests, it appears that FreeBSD follows the Itanium C++ ABI specification. The previous test failed because the C++ compiler was not used when linking libpgsjlj.so.

> macOS, M1

My tests show that macOS M1 roughly follows the Itanium C++ ABI specification, with only slight differences, such as the parameters accepted by the _Unwind_Stop_Fn function.

> macOS, x86

I don't have the resources to do the testing, but from a code perspective, it appears that macOS x86 follows the Itanium C++ ABI specification.

> Windows

It seems that Windows does not follow the Itanium C++ ABI specification at all. If we compile the program using the `/EHsc` option, longjmp will also trigger forced unwinding. However, unlike the Itanium C++ ABI, the forced unwinding triggered here cannot be captured by a C++ catch statement.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2023-05-09 14:12:44 Re: Add LZ4 compression in pg_dump
Previous Message torikoshia 2023-05-09 13:32:59 Re: Allow pg_archivecleanup to remove backup history files