Re: Test suite fails on alpha architecture

From: Falk Hueffner <falk(at)debian(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Steve Langasek <vorlon(at)debian(dot)org>, José Luis Rivero (yoswink) <yoswink(at)gentoo(dot)org>, debian-alpha(at)lists(dot)debian(dot)org, alpha(at)gentoo(dot)org, pgsql-bugs(at)postgreSQL(dot)org, Martin Pitt <martin(at)piware(dot)de>
Subject: Re: Test suite fails on alpha architecture
Date: 2007-11-07 19:19:55
Message-ID: 87mytp982s.fsf@debian.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> All the other diffs that Martin showed are divide-by-zero failures,
> and I do not see any of them on Gentoo's machine. I think that this
> must be a compiler bug. The first example in his diffs is just
> "select 1/0", which executes this code:
>
> int32 arg1 = PG_GETARG_INT32(0);
> int32 arg2 = PG_GETARG_INT32(1);
> int32 result;
>
> if (arg2 == 0)
> ereport(ERROR,
> (errcode(ERRCODE_DIVISION_BY_ZERO),
> errmsg("division by zero")));
>
> result = arg1 / arg2;
>
> It looks to me like Debian's compiler must be allowing the division
> instruction to be speculatively executed before the if-test branch
> is taken. Perhaps it is supposing that this is OK because control
> will return from ereport(), when in fact it will not (the routine
> throws a longjmp). Since we've not seen such behavior on any other
> platform, however, I suspect this is just a bug and not intentional.

Can you create a stand-alone testcase for this?

--
Falk

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Steve Langasek 2007-11-07 19:41:51 Re: Test suite fails on alpha architecture
Previous Message Tom Lane 2007-11-07 19:14:52 Re: pg_get_indexdef excludes tablespace info