Fix memset usage in pgcrypto

Started by Marko Kreenover 12 years ago5 messageshackers
Jump to latest
#1Marko Kreen
markokr@gmail.com

http://www.viva64.com/en/b/0227/ reported that on-stack memset()s
might be optimized away by compilers. Fix it.

* Replace memset() with px_memset()
* Add px_memset to copy_crlf()
* ADd px_memset to pgp-s2k.c

--
marko

Attachments:

pgcrypto-memset.difftext/x-diff; charset=us-asciiDownload+82-67
#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Marko Kreen (#1)
Re: Fix memset usage in pgcrypto

Marko Kreen escribi�:

http://www.viva64.com/en/b/0227/ reported that on-stack memset()s
might be optimized away by compilers. Fix it.

Just to clarify, this needs to be applied to all branches, right? If
so, does the version submitted apply cleanly to all of them?

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Marko Kreen
markokr@gmail.com
In reply to: Alvaro Herrera (#2)
Re: Fix memset usage in pgcrypto

On Mon, Jan 20, 2014 at 06:49:21PM -0300, Alvaro Herrera wrote:

Marko Kreen escribió:

http://www.viva64.com/en/b/0227/ reported that on-stack memset()s
might be optimized away by compilers. Fix it.

Just to clarify, this needs to be applied to all branches, right? If
so, does the version submitted apply cleanly to all of them?

It does apply cleanly. It is not critical fix, but it's simple,
so I think it should be back-patched.

--
marko

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Bruce Momjian
bruce@momjian.us
In reply to: Marko Kreen (#1)
Re: Fix memset usage in pgcrypto

On Thu, Dec 26, 2013 at 03:42:12PM +0200, Marko Kreen wrote:

http://www.viva64.com/en/b/0227/ reported that on-stack memset()s
might be optimized away by compilers. Fix it.

* Replace memset() with px_memset()
* Add px_memset to copy_crlf()
* ADd px_memset to pgp-s2k.c

Where are we on this patch? Seems it needs backpatching too.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#4)
Re: Fix memset usage in pgcrypto

On Mon, Mar 31, 2014 at 09:03:41PM -0400, Bruce Momjian wrote:

On Thu, Dec 26, 2013 at 03:42:12PM +0200, Marko Kreen wrote:

http://www.viva64.com/en/b/0227/ reported that on-stack memset()s
might be optimized away by compilers. Fix it.

* Replace memset() with px_memset()
* Add px_memset to copy_crlf()
* ADd px_memset to pgp-s2k.c

Where are we on this patch? Seems it needs backpatching too.

Patch backpatched through 8.4. Thanks.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers