From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: using explicit_bzero |
Date: | 2019-07-17 22:45:39 |
Message-ID: | 25152.1563403539@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> On 2019-Jul-11, Thomas Munro wrote:
>> Following a trail of crumbs beginning at OpenSSH's fallback
>> implementation of this[1], I learned that C11 has standardised
>> memset_s[2] for this purpose. Macs have memset_s but no
>> explicit_bzero. FreeBSD has both. I wonder if it'd be better to make
>> memset_s the function we use in our code, considering its standard
>> blessing and therefore likelihood of being available on every system
>> eventually.
> Sounds like a future-proof way would be to implement memset_s in
> src/port if absent from the OS (using explicit_bzero and other tricks),
> and use that.
+1 for using the C11-standard name, even if that's not anywhere
in the real world yet.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-07-17 22:48:07 | Re: getting ERROR "relation 16401 has no triggers" with partition foreign key alter |
Previous Message | Tom Lane | 2019-07-17 22:42:07 | New "-b slim" option in 2019b zic: should we turn that on? |