Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wkNAy-000dYV-34 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jul 2026 14:35:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wkNAx-00DsLh-2f for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jul 2026 14:34:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wkNAx-00DsLZ-1I for pgsql-hackers@lists.postgresql.org; Thu, 16 Jul 2026 14:34:59 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wkNAu-00000000bbs-1WAl for pgsql-hackers@lists.postgresql.org; Thu, 16 Jul 2026 14:34:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1784212495; bh=CigyAG4kUFyj7QAdL87eTbZu//gsmVN4OcNSdkrMpvY=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=cpp5l49l+iVJorevM5J33CP2gHrAzeJfgth9q82qmwi+41xjv1Lecb1r0O2pTzIAn IDE/2G74pRUcmsz4MgmveSiOn7dHloaplapm3L0Xw30HztFO/9GHmvEJdtTaecKrjo r/iQdhErYwCdP0/q6lollsYvnNQe3xDhL/pdoNItiEu1I2v7zhZp6pkXXFtlgKiCx3 9GMHwo7hUCyYbjx/R9p9nE747e/Nk8qkhoB05ItEjklsif7XdXRiscgfoZlnuC+ump 8qKLju4LQWedFTtExPieLrHFN7isYF1xIQ8vJI4muM+pu+orU4GCH4FxC74WY0M8wh MKSEhyDKLbntg== Received: from [10.9.2.196] (unknown [31.187.97.93]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: a.voloshin@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id F3D8560AD0; Thu, 16 Jul 2026 17:34:54 +0300 (MSK) Message-ID: Date: Thu, 16 Jul 2026 17:34:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Michael Paquier , Euler Taveira , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org References: Content-Language: en-US From: Anton Voloshin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-KSMG-AntiPhishing: NotDetected, bases: 2026/07/16 13:59:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 3.0.0.9059, bases: 2026/07/16 12:25:00 #28456689 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 15/07/2026 19:14, Álvaro Herrera wrote: >> Shouldn't this be extern *PGDLLIMPORT* bool ... ? > > Did you hit a problem with it? If so, what was it? Not a problem per se, rather a small inconsistency. Since commit 8ec569479fc Apply PGDLLIMPORT markings broadly. (2022-04-08) it seems to be a rule to mark all variables in .h files as PGDLLIMPORT. Perhaps, except frontend-only ones. As for now, $ find src/include -type f -print0 | xargs -0 src/tools/mark_pgdllimport.pl src/include/common/logging.h: adding 1 PGDLLIMPORT markers src/include/postmaster/syslogger.h: adding 1 PGDLLIMPORT markers modifies only two lines in two files. And common/logging.h is a frontend-only, so it's a natural exception. So I think there is no need to add another exception without explicit reasons, even though you are right and it's hard for me to think of a realistic need to refer to that variable from an extension. -- Anton Voloshin https://postgrespro.com