pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: Christian Ullrich <chris@chrullrich.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: Thu, 21 Apr 2016 17:15:24 -0400
Message-ID: <22094.1461273324@sss.pgh.pa.us> (raw)
In-Reply-To: <57192C59.9090903@dunslane.net>
References: <CAB7nPqTTcRGbDxS_RA4CWn1B_KRsvN+FTpct0mTp3v3gRWQ70g@mail.gmail.com>
	<56FB2BF8.3060303@dunslane.net>
	<CA+TgmoakpqU5uXDTkfaCHesFeW8N_aH5w-e991BfxkcREo7-mg@mail.gmail.com>
	<5705768E.4020908@dunslane.net>
	<5706FB7E.5070703@dunslane.net>
	<CAB7nPqR4QHFRZ1vjMo9Njy49hDAXOAjO+AEGhuCDzmhQJRagAw@mail.gmail.com>
	<570792ED.2080003@chrullrich.net>
	<5707AC9E.7070309@dunslane.net>
	<CAB7nPqROXyB_=-BbAXGnCdHFYUE4_+qgQAGk1swwnVQSfiab9Q@mail.gmail.com>
	<5707C80F.9050709@chrullrich.net>
	<5707D7DC.2030508@dunslane.net>
	<5707E074.4030102@chrullrich.net>
	<CAB7nPqSYAxCX+p0D0Qpqv6D4uLb2fmGcpUeKRxMyom5cAziuzg@mail.gmail.com>
	<CAB7nPqSOPynjV7ZC9wghkvwTpDPj7U=py7AoczzguTmv1kmh+g@mail.gmail.com>
	<0B77CFCB-0F90-4CAB-8509-7EB391C06D59@chrullrich.net>
	<570A6A14.6040303@dunslane.net>
	<570A9FCE.5040201@chrullrich.net>
	<570ABFA0.4090403@2ndquadrant.com>
	<CAB7nPqRek6M6HKpNXiNHx0J+rzC0XUbuZ5EMGvHSxLuZsebtyg@mail.gmail.com>
	<CAB7nPqRNwNXQ6C_1kODE5kN0WQUqLuWtPdLD4rn5nGmJUiibLw@mail.gmail.com>
	<57192C5! 9.9090903@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andrew Dunstan <andrew@dunslane.net> writes:
> 5. most importantly, on my Release/X64 build, I am getting a regression 
> failure on contrib/seg. regression diffs attached. Until that's fixed 
> this isn't going anywhere.

I'll bet a nickel that this means MSVC has broken the ABI rules that
allowed old-style (version 0) C functions to limp along without changes.
seg_same() and the other comparison functions that are misbehaving are
declared at the C level to return "bool".  I think what's happening is
they are now setting only one byte in the return register, or perhaps
only the low-order word, leaving the high-order bits as trash.  But
fmgr_oldstyle is coded as though V0 functions return "char *", and it's
going to be putting that whole pointer value into the result Datum, and
if the value isn't entirely zero then DatumGetBool will consider it
"true".  So this theory predicts a lot of intended "false" results will
read as "true", which is what your regression diffs show.

IIRC, we had intentionally left contrib/seg using mostly V0 calling
convention as a canary to let us know when that broke.  It's a bit
astonishing that it lasted this long, maybe.  But it looks like we're
going to have to convert at least the bool-returning functions to V1
if we want it to work on VS 2015.

Do the other contrib modules all pass?  I can't recall if seg was the
only one we'd left like this.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (134+ messages)  latest in thread

Message-ID: <22094.1461273324@sss.pgh.pa.us>
Permalink:  ../22094.1461273324@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22094.1461273324@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, michael.paquier@gmail.com, petr@2ndquadrant.com, chris@chrullrich.net, robertmhaas@gmail.com, magnus@hagander.net
  Subject: Re: VS 2015 support in src/tools/msvc
  In-Reply-To: <22094.1461273324@sss.pgh.pa.us>
  References: <CAB7nPqTTcRGbDxS_RA4CWn1B_KRsvN+FTpct0mTp3v3gRWQ70g@mail.gmail.com> <CA+TgmoakpqU5uXDTkfaCHesFeW8N_aH5w-e991BfxkcREo7-mg@mail.gmail.com> <5705768E.4020908@dunslane.net> <5706FB7E.5070703@dunslane.net> <CAB7nPqR4QHFRZ1vjMo9Njy49hDAXOAjO+AEGhuCDzmhQJRagAw@mail.gmail.com> <570792ED.2080003@chrullrich.net> <5707AC9E.7070309@dunslane.net> <CAB7nPqROXyB_=-BbAXGnCdHFYUE4_+qgQAGk1swwnVQSfiab9Q@mail.gmail.com> <5707C80F.9050709@chrullrich.net> <5707D7DC.2030508@dunslane.net> <5707E074.4030102@chrullrich.net> <CAB7nPqSYAxCX+p0D0Qpqv6D4uLb2fmGcpUeKRxMyom5cAziuzg@mail.gmail.com> <CAB7nPqSOPynjV7ZC9wghkvwTpDPj7U=py7AoczzguTmv1kmh+g@mail.gmail.com> <0B77CFCB-0F90-4CAB-8509-7EB391C06D59@chrullrich.net> <570A6A14.6040303@dunslane.net> <570A9FCE.5040201@chrullrich.net> <570ABFA0.4090403@2ndquadrant.com> <CAB7nPqRek6M6HKpNXiNHx0J+rzC0XUbuZ5EMGvHSxLuZsebtyg@mail.gmail.com> <CAB7nPqRNwNXQ6C_1kODE5kN0WQUqLuWtPdLD4rn5nGmJUiibLw@mail.gmail.com> <22094.1461273324@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox