Re: master make check fails on Solaris 10

From: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: master make check fails on Solaris 10
Date: 2018-01-17 15:13:59
Message-ID: 20180117181359.3a6cc06c@fafnir.local.vm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 17 Jan 2018 18:02:26 +0300
Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru> wrote:

> > Attached is a possible test program. I can confirm it passes on a
> > machine with working __int128, but I have no idea whether it will
> > detect the problem on yours. If not, maybe you can tweak it?
>
> Thank you! Using gcc 5.5.0 it prints that everything is ok. But,
> investigating the regression diffs, we found out that the error
> occurs when we pass int128 as not the first argument to the function
> (perhaps its value is replaced by the value of some address):

I'm attaching stripped-down version of test program, which demonstrate
the problem and two assembler listings produced with this C source using
alignment 8 and 16. May be this stripped-down version can be used as
base for configure test.

As it turns out, Sparc GCC passes function arguments via register ring
which is referenced as %on in the calling code and as %in in function.

And somehow it happens that alignment attribute of typedef affects
access to arguments in the function, but doesn't affect how regiser
ring is filled before call. Looks like bug in GCC.

Unfortunately, we have only one Sparc machine and started our
investigation by upgrading GCC 5.2.0 to GCC 5.5.0, so it is hard to
downgrade and test with older GCC.

--

Attachment Content-Type Size
align_test.c text/x-c++src 664 bytes
align_test8.s application/octet-stream 4.9 KB
align_test16.s application/octet-stream 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2018-01-17 15:14:41 Re: Package version in PG_VERSION and version()
Previous Message Marina Polyakova 2018-01-17 15:12:44 Re: master make check fails on Solaris 10