Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bv8HI-0001Au-VI for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 19:36:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bv8HI-0005fM-2z for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 19:36:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bv8Fu-00044E-8p for pgsql-hackers@postgresql.org; Fri, 14 Oct 2016 19:34:58 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bv8Fr-00058t-JQ for pgsql-hackers@postgresql.org; Fri, 14 Oct 2016 19:34:57 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id A86AEAF00DF; Fri, 14 Oct 2016 21:34:53 +0200 (CEST) Received: from ex (ip-109-44-3-236.web.vodafone.de [109.44.3.236]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ase@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 8C653AF002B; Fri, 14 Oct 2016 21:34:47 +0200 (CEST) From: Andreas Seltenreich To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: [sqlsmith] Infinite recursion in bitshift References: <87d1j2zqtz.fsf@credativ.de> <17165.1476473076@sss.pgh.pa.us> Date: Fri, 14 Oct 2016 21:34:42 +0200 In-Reply-To: <17165.1476473076@sss.pgh.pa.us> (Tom Lane's message of "Fri, 14 Oct 2016 15:24:36 -0400") Message-ID: <877f9azpv1.fsf@credativ.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Tom Lane writes: >> This is due to an integer overflow in bitshiftright()/bitshiftleft() >> leading to them recursively calling each other. Patch attached. > > Seems sane, though I wonder if it'd be better to use -INT_MAX rather > than -VARBITMAXLEN. I am undecided between those two. -INT_MAX might be a more precise fix for the problem, but the extra distance to the danger zone was kind of soothing :-). regards, Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers