Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avFN6-0003MB-BY for pgsql-committers@arkaria.postgresql.org; Wed, 27 Apr 2016 02:38:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1avFN5-0006Vm-Uo for pgsql-committers@arkaria.postgresql.org; Wed, 27 Apr 2016 02:38:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1avFN5-0006Tx-An for pgsql-committers@postgresql.org; Wed, 27 Apr 2016 02:38:35 +0000 Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1avFN2-0004iH-Tq for pgsql-committers@postgresql.org; Wed, 27 Apr 2016 02:38:34 +0000 Received: by mail-pf0-x22c.google.com with SMTP id 206so14407815pfu.0 for ; Tue, 26 Apr 2016 19:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sb0i8TzVlze7nDm6CKHfr/1Jyhl9ZccbCdYaUMCPgis=; b=cUTYUxuAEicMcN41MYMq/Of774frzQW9zqYwGBrwGT8q5nGsc51V2d5gD3ncv+MiHy yRCP1U+WyTH8CgTLuB42L86qq/xlvMil3QZ0nAKpFRY5fVkO5a27z1xDmkX3UGQ6CCOh oSOFU0VYFDgW/Xf+Y+cXHE/xZ5ETcT98/PdM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sb0i8TzVlze7nDm6CKHfr/1Jyhl9ZccbCdYaUMCPgis=; b=ELL3qL/tJa9OJDFnt5/Z6qd1feAd/HmWjyHEtF2wmJGybjAt3XMrF0sySXajX0sSX3 cTk5Kv4NXGmPqGEMkXj2A8bB5NcRSZzMoYO8Dp6DVNUzeInG0WvDUTTaWJAJrO19bi/t sx8gr7PftjNd0D+OksSOUPZ2ggE9XTrqlt/ZOiBFGr/nSY0+kZMqTHPPYQOrhplxg4M/ rvdSvEnhkQnDDFD94ITX4OmNPhIfrl84oqNfaDpZr4hHy7dM/2Erx4tA8pap3O0SXlri Mqk1exT9Tt24T5st86SLbp3QwkUE7EfezSAsUJVTjcyKSkqbkZRlgVBind2hG9FmvPh2 b0Yg== X-Gm-Message-State: AOPr4FWSkZgHVgs0+UL7hmdTWc3gpAagcXK9h+beF2kEikNAnzYJQfgPHPxxeCD6s6hF+A== X-Received: by 10.98.65.82 with SMTP id o79mr8303886pfa.115.1461724711385; Tue, 26 Apr 2016 19:38:31 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id 82sm1591702pfb.64.2016.04.26.19.38.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Apr 2016 19:38:30 -0700 (PDT) Date: Tue, 26 Apr 2016 22:38:28 -0400 From: Noah Misch To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Convert contrib/seg's bool-returning SQL functions to V1 call co Message-ID: <20160427023828.GA2150695@tornado.leadboat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On Fri, Apr 22, 2016 at 03:54:48PM +0000, Tom Lane wrote: > Convert contrib/seg's bool-returning SQL functions to V1 call convention. > > It appears that we can no longer get away with using V0 call convention > for bool-returning functions in newer versions of MSVC. The compiler > seems to generate code that doesn't clear the higher-order bits of the > result register, causing the bool result Datum to often read as "true" > when "false" was intended. This is not very surprising, since the > function thinks it's returning a bool-width result but fmgr_oldstyle > assumes that V0 functions return "char *"; what's surprising is that > that hack worked for so long on so many platforms. Does this warrant a change to the "Section 2" comment of postgres.h, explaining that its precautions no longer suffice everywhere? -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers