Re: seg regression failures - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: seg regression failures
Date
Msg-id 460422E5.5040306@hagander.net
Whole thread Raw
In response to Re: seg regression failures  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: seg regression failures  (Magnus Hagander <magnus@hagander.net>)
List pgsql-patches
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> The SEG parameters going into seg_overlap() look perfectly correct, and
>> seg_overlap() actually returns 0. But this is somehow later turned into
>> 't'. Any pointers for where to look for how that happens?
>
> I'll betcha that MSVC is generating code that only sets the low-order
> byte of the return register (EAX likely) where GCC tends to set the
> whole register.  So when the returned value is taken as a Datum, it
> might contain some garbage.

That looks very consistent with the data in my debugger (returned value
is not zero for the whole datum, but casted to bool it's fine).

I'm just going to clean up a compile error I introduced and try your
suggestion below, and I'll let you know how it works out.

//Magnus

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: seg regression failures
Next
From: Magnus Hagander
Date:
Subject: Re: seg regression failures