Re: using explicit_bzero - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: using explicit_bzero
Date
Msg-id CA+hUKGKAWKp-h9MX4VA4z3N2Mf1JqhZL0OkOm=n2S2xSpCT1Xg@mail.gmail.com
Whole thread Raw
In response to Re: using explicit_bzero  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: using explicit_bzero  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Sat, Jul 6, 2019 at 1:07 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 2019-07-05 14:06, Thomas Munro wrote:
> > +#ifndef HAVE_EXPLICIT_BZERO
> > +#define explicit_bzero(b, len) memset(b, 0, len)
> > +#endif
> >
> > I noticed some other libraries use memset through a function pointer
> > or at least define a function the compiler can't see.
>
> I don't understand what you are getting at here.

Do we want to provide a replacement implementation that actually
prevents the compiler from generating no code in some circumstances?
Then I think we need at least a function defined in another
translation unit so the compiler can't see what it does, no?

-- 
Thomas Munro
https://enterprisedb.com



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Next
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)