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 1wtg2B-000AJE-20 for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Aug 2026 06:32:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wtg29-001T21-0j for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Aug 2026 06:32:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wtg28-001T1t-1o for pgsql-hackers@lists.postgresql.org; Tue, 11 Aug 2026 06:32:22 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wtg27-000000003qZ-2tYB for pgsql-hackers@lists.postgresql.org; Tue, 11 Aug 2026 06:32:20 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 812B7EC012D; Tue, 11 Aug 2026 02:32:18 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 11 Aug 2026 02:32:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1786429938; x= 1786516338; bh=r5V+7Pdt4ZfWt6CoVmlRXS4b7Tlbj6Sadc7zhMRnBHE=; b=R 5jF1tHLFr1DDY1DovhGzk4GvdsE6uFk85Gu4rV8ZyfbxzEzMWSC5M36ICyvFd3br LtkiHqZwpVvuOU0UsYLFwmAAB+UjaKTu9bHuPOxwnRGoy2f19fxQrIvb5ZgytLj4 l33Wi5iiNthz8WKGtajrrq6Uv2Cl283bXDWiUY8GMzu0FdIH1KjRpKMON39PP36I WLxpIE6nzrm0SAMDUMaBO0LmS/CqRgRCnzi6HiTLIaxSxlW8nc0P16/fv4KPoyvq v3MSLgTgidgCLZZRd0Fr2xST+oeR4NzuIv8WOZk7kIXTcxxRbW90/Xq7Qrq7+X+v fX8h1uZlmCM/UHz3VoTcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1786429938; x=1786516338; bh=r 5V+7Pdt4ZfWt6CoVmlRXS4b7Tlbj6Sadc7zhMRnBHE=; b=Q+IqG8PJV5xoz33WL 0ubbOyUC7JsyARlo8bHq/XtdE6NCipAspummYkLdADL7UV/blQ87LDcochcTffw4 Y4QSqhZvWrC1MWJAbahi6dM3lPmkfG5/Z2Wu1i7KUxn+04CZDxjQtIKAZ1sdeipx JnQFEa1YdHt1upZiMH5rP6ui8Ei6h9urwhh9rpqTbnstSqdSVrckDEp/5YW99ZJd eIWII9toUmbK20vXOAP4GA+EwAl7bYCi3LpCs7HK2FxjVTqRr1mfA9pKGNa1dUO2 SV9wUMHwI6y/MJQr5/KeOgj3GO9ecyaUreQARinQy/3wjHDghepHVP4q/eXSSho8 C+ykw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGOsBKBgkYBiB5PEEtyZqUL6JUTaG6iUrQYXRvJeoGiy6DZNNAiSiw7hB+Jz2wmHe fUKuZd4t8yrptu1hd/fiFCPoZCckL3glEvyTwM+YZAWwwjUd5S81RbUqAI3TbG4fsKr7bY KCXf2WAlzx2gAIGAzniea+ATpNtzfc2Q0n0+90UEnVViiilCxqGPUohfwP3rgegUOU6dCg B3qlCiGeAwNdR1rceNgkM5WCpJGMbQ22BC5hKsR6ilev1r/HliTbp6DnGRg/fuAIpo1yoe At7LALH0Cqusg1G1/avKr4J72934/npZD118luMItulqpPDgGiEYZFA+fwsh0R0hJVosPy FqgMWBo/g1TnUTyROx8/c3oTCDfUpeyEzeNxDhbFg4ShKK30gFM6VzF21sr0liN96qx6DQ Bl9lmgdvDOrbkTcnh/SfvE3wMUjAEc5aI1vcGwZDghlOh43RmeuXuCt+gS3aYeH/InaDPX NVvTgd9qiMnQ3bEjxxB6JDcyH1/ItVh9RClyIEVgLOo6tS7sem1ZhqguAlH2r2t0ubEQYi OlzK0xviFfdZiBvU0iDqFm4mMMWleSkMq5OjqWZmGZQR2D1LH62JCQhmf2PVEZsYJscYzd HHAPeij4caJ/99BjNlik89V/KkeAsgg1jKaWJ/DdYeOEcX89A4lBffF8oMJg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Aug 2026 02:32:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1786429935; bh=OPHBs9HI3pmn0T3gSGw2qpCbfgXcqzw4xCqSPXU3UFU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=enpP/Ti0n865tWVezR18Fwa1iZ0ZheowND+MdsiuUz3P8GW+xUBf8TSFRKe13lLnS 3vwBS64FEMDY1PbcmgWrdMy3JUzubNBqAo7AcntoO7AUEoBObaKnae9Cbm7xlK5dek 5hOK1hSJ+Et7LpuVcz1resMPhvOp8PP2N4CV9GP8C34oySaJyuQ7OeUbZKC6TFTOBb AQ7Fn2Z5ZfAghTQZ+UwTW187k7WKBxsouf6zAsratXNcF81y4HZcjf9TT7yDBcN4hV bbqZiq2KrC2p5M8ALO9t4N5OPNbiDkgUPdL8uU61p0mw9zfKGJUEhnRZ6YFMTLWAxg XacfGh4t3Nu7g== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 4103DB001D9; Tue, 11 Aug 2026 08:32:15 +0200 (CEST) Date: Tue, 11 Aug 2026 08:32:15 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: "Masashi Kamura (Fujitsu)" Cc: "'pgsql-hackers@lists.postgresql.org'" , Jeff Davis Subject: Re: Crash issue in PG18.5 regression Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Aug-11, Masashi Kamura (Fujitsu) wrote: > Hi, > > We found that the program crashes when following the steps below. > > 1) Create the instance > initdb -D data --encoding=UTF8 --no-locale > > 2) Execute following SQL > SELECT to_date('01 ŞUB 2010', 'DD TMMON YYYY'); > > We are analyzing the cause and the following commit seems the cause. > https://github.com/postgres/postgres/commit/011384ba45f > > Could you please check this? I confirm that this crashes with my regular build options also, as long as initdb --no-locale is used. The backtrace from the crash point is #0 __GI___towupper_l (wc=74, locale=locale@entry=0x0) at ./wctype/wcfuncs_l.c:69 #1 0x0000563291e315b8 in strupper_libc_mb (dest=0x7ffe3664f100 "\002", destsize=80, src=0x5632b0c066d8 "Jan", srclen=3, locale=0x5632b0c02898) at ../../source/REL_18_STABLE/src/backend/utils/adt/pg_locale_libc.c:398 #2 strupper_libc (dst=dst@entry=0x7ffe3664f100 "\002", dstsize=dstsize@entry=80, src=src@entry=0x5632b0c066d8 "Jan", srclen=, locale=locale@entry=0x5632b0c02898) at ../../source/REL_18_STABLE/src/backend/utils/adt/pg_locale_libc.c:147 #3 0x0000563291e2f029 in pg_strupper (dst=dst@entry=0x7ffe3664f100 "\002", dstsize=dstsize@entry=80, src=src@entry=0x5632b0c066d8 "Jan", srclen=, locale=locale@entry=0x5632b0c02898) at ../../source/REL_18_STABLE/src/backend/utils/adt/pg_locale.c:1325 The relevant code in src/backend/utils/adt/pg_locale_libc.c's strupper_libc_mb() from frame 1 is 397 │ for (curr_char = 0; workspace[curr_char] != 0; curr_char++) 398 │ workspace[curr_char] = towupper_l(workspace[curr_char], loc); where the important detail is that 'loc' is 0, which is not a valid locale handle. The locale code is quite the maze, but I'll see if I can find why is the locale object not initialized. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Maybe there's lots of data loss but the records of data loss are also lost. (Lincoln Yeoh)