Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iX0af-0001TN-2R for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 10:18:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iX0ad-0007Mu-NP for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 10:18:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iX0ad-0007Mn-6b for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 10:18:31 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iX0aa-0003ea-2X for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 10:18:29 +0000 Received: by mail-wm1-x344.google.com with SMTP id b17so2851471wmj.2 for ; Tue, 19 Nov 2019 02:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=f3pnBq4GM2PEviUIDdl90l+tAtQW5UTpqMz8gGR9lrs=; b=rLgNzZYm97nrztcHFVdvjJQ2XSmKqF67vc7AkBwicky3ofJJVA4AGIjwLhCatuBABG PnSwh+LUvuSL8F24EE6ePSBbOi7XnZSqc1j0b4ZvKkfOxBQjk3uKBnya7Qdra6UFt0uA Gy2z6b2KYwgf9PR/FXDfga+YOl7JHsazIQCS/S6WKlYQJdKT0KtK1V9ioLxcbgGQafyk StoK6U3Vi+ILsBhi4sKCxjXpTBrYezULunJmY6co/qOlRJIQhxX9SBSUeQVRrzvMDKfb P4PMOd/+KjyqJGAwUmCgutLrPFUj9CgCrLUirtYO2v1jS9/WvfBYuW5iSC7ZdZftNqOe cj2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=f3pnBq4GM2PEviUIDdl90l+tAtQW5UTpqMz8gGR9lrs=; b=l0tZnIEY1VBMjEw6+wVGnm/l75ZCweev5EfevqdF4NmNWbeWk5qngiLYQl9S2j2boa iux854MtkNKS+/y2mxP/KQShIz0S94weTkmvAezrE5sVHntgN5jtSWwczeqZlbYy8OYW RFpyNaUE+Hg087g7FK55kyTDq+h46P7GUAO1JlAnmjG+o4HwzsCccVmsqMMWI9bN0z0o d8Q0I6pEd0fwe9dAPDBT+SkcgTbzzMB1V5u2b4/ypuJdF0qFnOyHyBNG1J8qENe/PUFK tu6JZDUHQ9E/A9dp1LTIpCcxcpo3uu2RfGnvy45m1H3jo6T1c33HDtHMT16BfaCXjmX4 dvQg== X-Gm-Message-State: APjAAAU5ibuGrZJTVPo9SUB2tkcb8Zu5gcKFGz64CNSv/H2LSmtZEchX zYhFSjqIBFsiXgbf0ybyWZSQ2RdNT44= X-Google-Smtp-Source: APXvYqwO6471x5M2m9Va8EvYU8sKWLnKjHhYthW1XBcQjhXWwuc1rEme0xt4L3WGCfuHGTO24MW8XA== X-Received: by 2002:a1c:9e10:: with SMTP id h16mr4434191wme.91.1574158705131; Tue, 19 Nov 2019 02:18:25 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id 200sm2815650wme.32.2019.11.19.02.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 02:18:19 -0800 (PST) Date: Tue, 19 Nov 2019 11:18:18 +0100 From: Tomas Vondra To: Michael Paquier Cc: Adam Scott , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query Message-ID: <20191119101818.4txjfihoglny5c6u@development> References: <16122-eb35bc248c806c15@postgresql.org> <20191118120312.cblcswef6vuqbijq@development> <20191119014827.GC1614@paquier.xyz> <20191119030428.GD1614@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191119030428.GD1614@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Nov 19, 2019 at 12:04:28PM +0900, Michael Paquier wrote: >On Mon, Nov 18, 2019 at 06:22:11PM -0800, Adam Scott wrote: >> Maybe a clue to the issue, why does a numrange need to be detoasted since >> that is for large strings? > >I looked at the code a bit but could not really figure out what could >go wrong. Then I switched my strategy and bisected for the first >commit leading to the failure, and this is pointing me to the >integration of stdbool.h for my environment (Debian SID with kernel at >5.3): >commit: 9a95a77d9d5d3003d2d67121f2731b6e5fc37336 >author: Peter Eisentraut >date: Thu, 22 Mar 2018 20:42:25 -0400 >Use stdbool.h if suitable > >Using the standard bool type provided by C allows some recent compilers >and debuggers to give better diagnostics. Also, some extension code and >third-party headers are increasingly pulling in stdbool.h, so it's >probably saner if everyone uses the same definition. > >I have also checked that manually and I am getting a match. And the >thing is that this commit did not make it through 10... Not sure I understand. How could this be the root cause when it's not present in the 10.x branch (which is what Adam is using)? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services