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 1wXgNU-003PmR-2T for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jun 2026 14:27:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXgNT-00GDVC-20 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jun 2026 14:27:27 +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 1wXgNS-00GDV4-2P for pgsql-bugs@lists.postgresql.org; Thu, 11 Jun 2026 14:27:27 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wXgNP-00000002YqB-3CoS for pgsql-bugs@lists.postgresql.org; Thu, 11 Jun 2026 14:27:26 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 21DD67A00D8; Thu, 11 Jun 2026 10:27:21 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 11 Jun 2026 10:27:21 -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=fm2; t=1781188040; x= 1781274440; bh=IzkIy06iBwC/xQWEhtiv7lhPZof4lTo/HobtIKma27I=; b=W 2ulda5Iv9AQVcad7LYU8eAnW3ckFPlqXDWJzG+6ErDO057mFqOVZMVELsKhHEU+z BIP0bYvENZdi1fhy+9LlXdjoY0nUtpPoOBHQJ4uNwJkM+XUL2LOUM5aapXkP1WW/ GkhvIRpWH4vV7f+/9OeBXTCtMwg7/R6bda9oJihcHPtvVFSTmi4GWTzds4jKv6vv F18jWo4J2X/cp+Tyb5jtvqYFKjU2Zx84vskR1HbgquHkvh3uVWvJvGGeXGRiuFe8 ES0zoo8lTzb/Js9Ph+qbZxfBkvQWbUvkrzvXJb/F+VYw/T3SxRA4bnf12q5pmZwT ZFpQCzumN7zuhUbzo2CXQ== 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=fm1; t=1781188040; x=1781274440; bh=I zkIy06iBwC/xQWEhtiv7lhPZof4lTo/HobtIKma27I=; b=iyHaU8x2CIgzZUAm+ PInl88DClDP1bGdGVkULN8VBdR73EZsH27/P9NJxlfcpjjvoXLlRjk/edyR/Nr1Z /cFAhzfvPmzo3kWvYZlAfCBUvilD/YKu+50HV63cibGRdr3sSKWGJzPivAMCO5BH 8ndfMs6spaZx1w8G6qYqrDM+VvB3He22RT2WMbj++G3a1P2qzT7Sl7vRgKFiJ6uR bjDUyDIzBZ9F2vAlOAzFeVI3LRkijBc6lMqnCnIMco/uB9zrnn8bIYBYQtS0gCxn Zuoi9VAKiPY/OV2LijUHg8d6QZev9PDS4tHtKmdsLnkVkhZ348V9Lk0sN2YFGhII TLfFw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF6eTUg2TAoOqUc3tnSkR58QLqCHBDg6GbAMiM2on/U1JVVQiHJS7YnIEyclr1KYl qOVraR6F4Okb7conppLwv3kUa/c1zsG3QPVjGpSH9ftiPkxaqZcLxIp+MA6hW6nTlYOlQi xX6BsrOpRWj28+f1tCedwIAT0YFeIZmKhTpBSM4JzQ73X5T0Ety9RKSUj/q997UUjPkyqK mWXjXb4rrbJ6B6FVl43Q5Q7GLWjxzCXO5yLGpwvkDxcnZlv6VuGLoAxdrzR0ggzQNoMnmh Vu2GIlBCQbDSQdwGz2XJJLU4oOXzYeJiPP+WO0VT5TIaZCjTAk6fUs7lqQy/viNnE1r9K5 pO2Lr3BtiIlF6t2tmN6xGyXn+yjgWyLb2G2FST92MaN7wA/J6OoSHK0Eye1S1F7XtZuvi1 x7lIT7LUxqcqbA4WsNhs6cQf4uvqYxw+jTJHQmf619ZIZkjeAjPgLU6bQEd/8wrlmD6dpm 92xyCPdFFj0ifMv3hUvt8gH3eLbpc0lyoKndntsgs+tXr4r9p/XlcDLRZ6nRDmm3k9Neaf puIsbWQ7L39dPBZC2MUMWaa/uP1MnSRJgbGXaA5u83NJF48JG8EuAlVMp+09H+F8p36hVJ bRe07P3VLDjbSRjVzqgf3UleTA0R5tPT3LN9gjMBb0mQwOZXZ1sMiqqYARDA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 11 Jun 2026 10:27:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1781188037; bh=69IzuyVBVXSZGGPtSQNXjKySnX14hARp04oVIAs0QI8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=voXtiOsqeMj2LHS9Udj/5y3F95vlwiTh9/iIGa9uOpXiBvSIznrvfHpzwcLGokZyt zryxu9uvU5rJZ/bS98OjKo3EtzfBSAPOQTkPq64W4faELETVro6NGLCms2unMBz+jo c0I6EOOtPzoROk2w9EeVxic6gl1R1BWtRHgvoJ8ujAOnsl62vh6Mdi9CfczamIA6EO 6Y/4s+4rXWclEGIUB6PujnVIWOBkV2LzxgDy7fjZpewxVxyleSa1jOZbFTNWzzm8NP xRMBcY8pB0ZCdk6mHVREJiyIz2iJ0pIAFXQzAfEJ81loT61QzjQP70RRJT8JdtNJXP q2tkB6fx7O08g== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 4E53DB00680; Thu, 11 Jun 2026 16:27:17 +0200 (CEST) Date: Thu, 11 Jun 2026 16:27:17 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Srinath Reddy Sadipiralla Cc: Ayush Tiwari , 798604270@qq.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19491: Segmentation fault triggered by IS NULL 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-Jun-06, Srinath Reddy Sadipiralla wrote: > On Fri, Jun 5, 2026 at 9:41 PM Ayush Tiwari > wrote: > > Thanks, that reads better. v2 attached, raising ERRCODE_CANNOT_COERCE > > right where the coercion fails: > > > > ERROR: cannot cast type sqljson_mystr to text > > > > which also covers the JSON() WITH UNIQUE KEYS path. > > Thanks for the updated patch, LGTM. Thank you, I have pushed this to all branches since 16. I also added an Assert() to makeJsonIsPredicate() that 'expr' is not null. This wouldn't have caught this problem, mind, because what was really missing is an example case where the problem appears. However, it seems good manners to disallow that case explicitly rather than have it return a Expr node with a embedded null pointer that's only going to cause indirect problems. BTW the subject of this thread is somehow comically bogus. The problem is IS JSON causing a NULL pointer dereference, not IS NULL. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/