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+YENpG2nU3aTxWX_T=+g-dsyZoR6bPqUxEro7YKuwYr9Tw@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() )  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On Fri, 4 Sep 2020 at 14:13, Craig Ringer <craig@2ndquadrant.com> wrote:

I actually had a pretty good look around for static analysis options to see if I could find anything that might help us out before I landed up with this approach.



Using a test program:

so ... that's interesting. I'll need to do some checking and verify that it's effective on the actual problem I originally had, but if so, I shall proceed with kicking myself now.

Handily, the same thing can be used to detect PG_TRY() escapes.

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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Compatible defaults for LEAD/LAG
Next
From: Jakub Wartak
Date:
Subject: Division in dynahash.c due to HASH_FFACTOR