ExecAppendAsyncEventWait() in REL_14_STABLE can corrupt PG_exception_stack - Mailing list pgsql-hackers

From Alexander Pyhalov
Subject ExecAppendAsyncEventWait() in REL_14_STABLE can corrupt PG_exception_stack
Date
Msg-id 425fa29a429b21b0332737c42a4fdc70@postgrespro.ru
Whole thread Raw
Responses Re: ExecAppendAsyncEventWait() in REL_14_STABLE can corrupt PG_exception_stack
List pgsql-hackers
Hi.

Recent commit 555276f8594087ba15e0d58e38cd2186b9f39f6d introduced final 
cleanup of node->as_eventset in ExecAppendAsyncEventWait().
Unfortunately, now this function can return in the middle of TRY/FINALLY 
block, without restoring PG_exception_stack.

We found this while working on our FDW. Unfortunately, I couldn't 
reproduce the issue with postgres_fdw, but it seems it is also affected.

The following patch heals the issue.

-- l
Best regards,
Alexander Pyhalov,
Postgres Professional
Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: A failure in t/001_rep_changes.pl
Next
From: Daniel Gustafsson
Date:
Subject: Refactor SASL exchange in preparation for OAuth Bearer