Re: Dead stores in src/common/sha2.c

2019-06-03 Thread Tom Lane
Heikki Linnakangas writes: > On 29/05/2019 18:47, Hamlin, Garick L wrote: >> On Wed, May 29, 2019 at 11:01:05AM -0400, Tom Lane wrote: >>> At the same time, I'm not sure if we should just write this off as an >>> ignorable warning. If the C compiler concludes these are dead stores >>> it'll proba

Re: Dead stores in src/common/sha2.c

2019-05-29 Thread Heikki Linnakangas
On 29/05/2019 18:47, Hamlin, Garick L wrote: On Wed, May 29, 2019 at 11:01:05AM -0400, Tom Lane wrote: At the same time, I'm not sure if we should just write this off as an ignorable warning. If the C compiler concludes these are dead stores it'll probably optimize them away, leading to not acc

Re: Dead stores in src/common/sha2.c

2019-05-29 Thread Hamlin, Garick L
On Wed, May 29, 2019 at 11:01:05AM -0400, Tom Lane wrote: > Michael Paquier writes: > > On Wed, May 29, 2019 at 01:24:19PM +, Hamlin, Garick L wrote: > >> I ran clang checker and noticed these. It looks like the > >> sha2 implementation is trying to zero out state on exit, but > >> clang ch

Re: Dead stores in src/common/sha2.c

2019-05-29 Thread Tom Lane
Michael Paquier writes: > On Wed, May 29, 2019 at 01:24:19PM +, Hamlin, Garick L wrote: >> I ran clang checker and noticed these. It looks like the >> sha2 implementation is trying to zero out state on exit, but >> clang checker finds at least 'a' is a dead store. >> >> Should we fix thi

Re: Dead stores in src/common/sha2.c

2019-05-29 Thread Michael Paquier
On Wed, May 29, 2019 at 01:24:19PM +, Hamlin, Garick L wrote: > I ran clang checker and noticed these. It looks like the > sha2 implementation is trying to zero out state on exit, but > clang checker finds at least 'a' is a dead store. > > Should we fix this? > Is something like the attac

Dead stores in src/common/sha2.c

2019-05-29 Thread Hamlin, Garick L
I ran clang checker and noticed these. It looks like the sha2 implementation is trying to zero out state on exit, but clang checker finds at least 'a' is a dead store. Should we fix this? Is something like the attached sensible? Is there a common/better approach to zero-out in PG ? Garick di