Re: using explicit_bzero

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: using explicit_bzero
Date: 2019-07-22 18:35:32
Message-ID: 9903.1563820532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 2019-07-18 00:45, Tom Lane wrote:
>> +1 for using the C11-standard name, even if that's not anywhere
>> in the real world yet.

> ISTM that a problem is that you cannot implement a replacement
> memset_s() as a wrapper around explicit_bzero(), unless you also want to
> implement the bound checking stuff. (The "s"/safe in this family of
> functions refers to the bound checking, not the cannot-be-optimized-away
> property.) The other way around it is easier.

Oh, hm.

> Also, the "s" family of functions appears to be a quagmire of
> controversy and incompatibility, so it's perhaps better to stay away
> from it for the time being.

Fair enough.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-07-22 18:36:39 Re: Add CREATE DATABASE LOCALE option
Previous Message Peter Eisentraut 2019-07-22 18:19:26 Re: errbacktrace