Re: Fix for OpenSSL error queue bug

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Peter Geoghegan <pg(at)heroku(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, David Zuelke <dz(at)heroku(dot)com>
Subject: Re: Fix for OpenSSL error queue bug
Date: 2016-04-08 01:08:56
Message-ID: 570704A8.3080908@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/14/2016 09:44 PM, Peter Geoghegan wrote:
> On Mon, Mar 14, 2016 at 4:11 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>> Yes, with one small difference: I wouldn't be calling ERR_get_error()
>> in the common case where SSL_get_error() returns SSL_ERROR_NONE, on
>> the theory that skipping that case represents no risk. I'm making a
>> concession to Peter E's view that that will calling ERR_get_error()
>> more will add useless cycles.
>
> The attached patch is what I have in mind.
>
> I can produce a back-patchable variant of this if you and Peter E.
> think this approach is okay.

I think this patch is OK under the premises that we have established.

I wish we could avoid the huge, repeated comment blocks. Perhaps we
could put them at the top of the files once?

Also, why do you write 0UL instead of just 0?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-04-08 01:14:15 Re: VS 2015 support in src/tools/msvc
Previous Message Jeff Janes 2016-04-08 00:53:54 Re: GIN data corruption bug(s) in 9.6devel