Re: BUG #5592: list of integer undefined behaviors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Regehr <regehr(at)cs(dot)utah(dot)edu>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5592: list of integer undefined behaviors
Date: 2010-08-03 22:08:22
Message-ID: 1840.1280873302@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

John Regehr <regehr(at)cs(dot)utah(dot)edu> writes:
> Tom, would you be willing to isolate these operations into functions
> that could be marked with a "no_overflow_check" attribute? This would
> be easy for us to deal with, would survive preprocesing cleanly, and
> wouldn't have any performance cost since inliners do a fine job.

Uh, *some* inliners do a fine job. I'm not really willing to depend on
that for performance.

However, most of the cases that seem of interest so far are in fairly
small, stable functions. Would it be reasonable to attach a "checked
for overflow problems" label to these functions as a whole?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John Regehr 2010-08-03 22:19:29 Re: BUG #5592: list of integer undefined behaviors
Previous Message John Regehr 2010-08-03 22:02:47 Re: BUG #5592: list of integer undefined behaviors