Incorrect allocation handling for cryptohash functions with OpenSSL - Mailing list pgsql-hackers

From Michael Paquier
Subject Incorrect allocation handling for cryptohash functions with OpenSSL
Date
Msg-id X9xbuEoiU3dlImfa@paquier.xyz
Whole thread Raw
Responses Re: Incorrect allocation handling for cryptohash functions with OpenSSL
List pgsql-hackers
Hi all,

As of the work done in 87ae9691, I have played with error injections
in the code paths using this code, but forgot to count for cases where
cascading resowner cleanups are involved.  Like other resources (JIT,
DSM, etc.), this requires an allocation in TopMemoryContext to make
sure that nothing gets forgotten or cleaned up on the way until the
resowner that did the cryptohash allocation is handled.

Attached is a small extension I have played with by doing some error
injections, and a patch.  If there are no objections, I would like to
commit this fix.

Thanks,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: allow to \dtS+ pg_toast.*
Next
From: "Tang, Haiying"
Date:
Subject: RE: [Patch] Optimize dropping of relation buffers using dlist