[PATCH] Demangler fuzzer

Gary Benson gbenson@redhat.com
Tue Aug 12 17:12:00 GMT 2014


Ian Lance Taylor wrote:
> On Tue, Aug 12, 2014 at 2:02 AM, Gary Benson <gbenson@redhat.com> wrote:
> > +#include <demangle.h>
> 
> Include demangle.h with "".

Ok.

> > +int
> > +main (int argc, char *argv[])
> > +{
> > +  char symbol[2 + MAXLEN + 1] = "_Z";
> > +  int seed = -1, seed_set = 0;
> > +  int count = 0, maxcount = -1;
> 
> I think that by default the program should stop.  That will make it
> possible to eventually run as part of "make check".  Give it some
> number of iterations that stops it in a second or so.  You can still
> have it run forever by using -m -1.

On my machine it usually fails in 3-5 seconds, so a 1 second run seems
a little too short.  How does 10 seconds sound?

Thanks,
Gary

-- 
http://gbenson.net/



More information about the Gcc-patches mailing list