Re: Odd 9.4, 9.3 buildfarm failure on s390x - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Odd 9.4, 9.3 buildfarm failure on s390x
Date
Msg-id 87h8i7ejqg.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Odd 9.4, 9.3 buildfarm failure on s390x  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 > Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
 >> Because int being more than 32 bits is the simplest explanation for
 >> this difference.

 Tom> Curious to hear your reasoning behind that statement? I hadn't
 Tom> gotten further than "memcmp is broken" ... and neither of those
 Tom> theories is tenable, because if they were true then a lot more
 Tom> things besides uuid sorting would be falling over.

memcmp() returns an int, and guarantees only the sign of the result, so
((int32) memcmp()) may have the wrong value if int is wider than int32.

But yeah, it seems unlikely that it would break for uuid but not bytea
(or text in collate C).

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: [RFC] Removing "magic" oids
Next
From: Amit Kapila
Date:
Subject: Re: SerializeParamList vs machines with strict alignment