Re: [PATCH] Detect escape of ErrorContextCallback stack pointers (and from PG_TRY() ) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [PATCH] Detect escape of ErrorContextCallback stack pointers (and from PG_TRY() )
Date
Msg-id CAMsr+YGMZG6SrF6NpTaCCjktPQzmauCVrD_6CoOOvLwMRWacsA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Detect escape of ErrorContextCallback stack pointers (and from PG_TRY() )  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: [PATCH] Detect escape of ErrorContextCallback stack pointers (and from PG_TRY() )
List pgsql-hackers
On Fri, 4 Sep 2020 at 14:55, Craig Ringer <craig@2ndquadrant.com> wrote:
 

Example here:


So I find that actually, the __attribute__((callback(fn)) approach is unnecessary for the purpose proposed.



I still think we should be looking at tidying up the error contexts API, but it's easy enough for extensions to provide a wrapper over it, so that's not a big deal really.

I will submit my docs patches separately to ensure they get some attention, and I'll experiment with llvm threadsafety annotations / capabilities.




--
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Resetting spilled txn statistics in pg_stat_replication
Next
From: Fujii Masao
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2