Re: using explicit_bzero
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-23T19:57:18Z
Lists: pgsql-hackers
Attachments
- v2-0001-Use-explicit_bzero.patch (text/plain) patch v2-0001
On 2019-06-23 21:55, Peter Eisentraut wrote: > On 2019-06-21 15:25, Tom Lane wrote: >> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes: >>> +#ifndef HAVE_EXPLICIT_BZERO >>> +#define explicit_bzero(b, len) bzero(b, len) >>> +#endif >> >> This presumes that every platform has bzero, which is unsafe (POSIX >> doesn't specify it) and is an assumption we kicked to the curb a dozen >> years ago (067a5cdb3). Please use memset() for the substitute instead. > > OK, done. and with patch attached -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Use explicit_bzero
- 74a308cf5221 13.0 landed