From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: planner fails on HEAD |
Date: | 2011-12-04 22:55:41 |
Message-ID: | 19320.1323039341@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> it looks like gcc bug - gcc 4.5.1 20100924 (Red Hat 4.5.1) It was
> configured just with --enable-debug and --enable-cassert
Is this x86? I can't reproduce it on x86_64.
It's fairly easy to get a set of values such that innerstartsel *should*
equal innerendsel; but if one value has been rounded to memory precision
and the other hasn't, the assert could certainly fail.
Some digging around yields the information that the gcc hackers do not
consider this a bug, or at least adamantly refuse to do anything about it:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
Comment 47 is particularly relevant to our situation:
To summarize, this defect effectively states that:
assert( (x/y) == (x/y) )
may cause an assertion if compiled with optimization.
Also, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45691#c4
indicates that an explicit cast to double should help. Would
you check if the problem goes away if the Asserts are changed to
Assert((double) outerstartsel <= (double) outerendsel);
Assert((double) innerstartsel <= (double) innerendsel);
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-12-04 23:06:01 | Re: why local_preload_libraries does require a separate directory ? |
Previous Message | Pavel Stehule | 2011-12-04 22:52:41 | Re: planner fails on HEAD |