__pg_log_level in anonynous enum should be initialized? (Was: pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro)

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: __pg_log_level in anonynous enum should be initialized? (Was: pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro)
Date: 2020-09-28 07:33:30
Message-ID: 20200928073330.GC2316@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi all,
(Moved the discussion to -hackers)

On Mon, Sep 28, 2020 at 03:48:12AM +0000, Michael Paquier wrote:
> Change SHA2 implementation based on OpenSSL to use EVP digest routines
>
> The use of low-level hash routines is not recommended by upstream
> OpenSSL since 2000, and pgcrypto already switched to EVP as of 5ff4a67.
> Note that this also fixes a failure with SCRAM authentication when using
> FIPS in OpenSSL, but as there have been few complaints about this
> problem and as this causes an ABI breakage, no backpatch is done.

It looks like this commit has broken prairiedog as follows:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2020-09-28%2005%3A45%3A55
ld: common symbols not allowed with MH_DYLIB output format with the
-multi_module option
../../../src/common/libpgcommon_shlib.a(logging_shlib.o) definition of
common ___pg_log_level (size 4)

Looking around, I have found a similar report from MacPorts and 10.4,
leading to the fact that it may be better to initialize
__pg_log_level:
https://trac.macports.org/ticket/19829

This has visibly not popped up until now because jsonapi.c,
controldata_utils.c and file_utils.c are not getting used by libpq,
though libpgcommon_shlib.a includes them. And libpq uses
fe-auth-scram.c, that itself depends scram-common.c, and then depends
on the SHA2 routines. Shouldn't __pg_log_level be initialized in
logging.c?
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-09-28 16:05:19 pgsql: Cache the result of converting now() to a struct pg_tm.
Previous Message Michael Paquier 2020-09-28 03:48:12 pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2020-09-28 07:42:56 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message k.jamison@fujitsu.com 2020-09-28 07:29:57 RE: [Patch] Optimize dropping of relation buffers using dlist