[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] arthur's bugs



Yes, very interesting.  I'm convinced.

Xuejun-- please add sprinkling printfs() throughout the code to your TODO list. It'll be quick and easy. Maybe this is turned off by default?

Arthur, the rule we try to follow is that anytime there are multiple ways to do something, we should randomly do it all of the different ways we can think of. I think this is kind of a golden rule of random testing. In practice we follow this only inconsistently because taken to an extreme, it's too much work.

John





On 04/29/2011 03:06 PM, Yang Chen wrote:
Arthur O'Dwyer wrote:
On Fri, Apr 29, 2011 at 1:33 PM, John Regehr <regehr@cs.utah.edu> wrote:
By the way, I've been wondering about your original motivation for
printing only a final checksum,
Basically two reasons.

First, we wanted to give the compiler maximum freedom to mess with the
program without being constrained by the optimization-squashing
restrictions
of an external function call.

Optimization-squashing, you say? :) One man's squash is another man's
enable.
http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Of course, in fairness, it wouldn't be very likely that a randomly
generated format string would happen to match one of the triggers
listed in that article; I don't really expect that GCC would do
anything weird with printf("%d %s %x",...). But you never know.
Derek Jones was talking just last week on this list about a
hypothetical buggy compiler that would misoptimize printf("%d", (myint
= 42L)).


Interesting reading. Arthur, Thanks for the pointer!

- Yang