Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3hil-0004IP-Qe for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 16:26:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3hik-0003Fs-QW for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 16:26:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3hik-0003Fh-Io for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 16:26:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3hih-0003Z8-Qu for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 16:26:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16EGQeJf3517181; Wed, 14 Jul 2021 12:26:40 -0400 From: Tom Lane To: Peter Eisentraut cc: Ranier Vilela , Laurenz Albe , PostgreSQL Hackers Subject: Re: printf %s with NULL pointer (was Re: BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped) In-reply-to: <06a9ff0f-d1e9-0340-2f3b-180cefe41c7a@enterprisedb.com> References: <17098-b960f3616c861f83@postgresql.org> <2468663.1626017338@sss.pgh.pa.us> <2984422.1626110456@sss.pgh.pa.us> <3227956.1626186568@sss.pgh.pa.us> <3280448.1626200778@sss.pgh.pa.us> <06a9ff0f-d1e9-0340-2f3b-180cefe41c7a@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Wed, 14 Jul 2021 08:05:54 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3517179.1626280000.1@sss.pgh.pa.us> Date: Wed, 14 Jul 2021 12:26:40 -0400 Message-ID: <3517180.1626280000@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > In this particular case, I would for example be quite curious how those > alternative minimal C libraries such as musl-libc handle this. Interesting question, so I took a look: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n593 case 's': a = arg.p ? arg.p : "(null)"; ... Any others you'd like to consider? regards, tom lane