| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | John Regehr <regehr(at)cs(dot)utah(dot)edu> | 
| Cc: | pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: BUG #5590: undefined shift behavior | 
| Date: | 2010-08-02 16:16:01 | 
| Message-ID: | 18394.1280765761@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
John Regehr <regehr(at)cs(dot)utah(dot)edu> writes:
> On 08/02/2010 09:06 AM, Tom Lane wrote:
>> John: how did you detect this?
> One of my students has hacked Clang to detect integer undefined
> behaviors in C, like this shift problem or signed overflows.
Cool.
> This was
> the only problem that came up during a "make check" of a postgresql with
> this checking turned on, which is pretty cool.
Hrm, I'd have expected you to see a few integer overflows during the
regression tests --- we do test that the overflow checks in places
like int4pl work.  You might be interested in this concurrent thread:
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00024.php
particularly the comments about overflow.
> I'd expect to be able to find more problems if I could get hold of a
> good fuzz tester for postgresql, or at least some much larger test
> inputs. Are there any of these you folks would suggest that I use?
Yeah, the PG regression tests aren't amazingly good coverage-wise
(although running the contrib tests as well as core helps --- did you
do that?).  I'm afraid I haven't got a good suggestion for you.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Regehr | 2010-08-02 16:48:06 | Re: BUG #5590: undefined shift behavior | 
| Previous Message | John Regehr | 2010-08-02 15:54:46 | Re: BUG #5590: undefined shift behavior |