On Wed, Jul 15, 2026 at 05:28:39PM -0700, Andrea Pinski wrote:
> On Wed, Jul 15, 2026 at 5:07 PM Kees Cook <[email protected]> wrote:
> >
> > On Wed, Jul 15, 2026 at 12:06:17PM -0700, Kees Cook wrote:
> > > On Sat, Jun 27, 2026 at 03:00:42PM -0700, Andrea Pinski wrote:
> > > > On Thu, Jun 18, 2026 at 1:45 PM Kees Cook <[email protected]> wrote:
> > > > > [...]
> > > > > +
> > > > > +    
> > > > > printf("\n================================================================\n");
> > > > > +    printf("Passed: %d Failed: %d (%d total tests)\n", pass, fail, 
> > > > > pass + fail);
> > > > > +    return fail;
> > > > > +}
> > > >
> > > > It would be a good idea to add a random generated testing here. See
> > > > testsuite/objc.dg/gnu-encoding and testsuite/gcc.dg/compat for
> > > > examples.
> > >
> > > Okay, thanks for the pointer; I'll see what I can come up with. I
> > > generally dislike random testing since they may appear to be "flaky"
> > > when they trip, but I'll give it a shot.
> >
> > I don't see anything we can do valuably here. There's no round-trip
> > parsing going on (there's no independent oracle). For the existing
> > mangling tests, I have hard-coded all the expected strings/hashes. I have
> > gone through the TYPE enums, though, and added a few other missed types
> > for the mangler. But I built a python-based fuzzer anyway, just to see if
> > I could find any other combinatorial ICEs, in case I missed some mixture,
> > and I could only crash the ToT GCC frontend. :P It's okay in 16.1?
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126284
> 
> What about Adding something like gcc/testsuite/gcc.dg/compat/ where
> you compile with 1 or 2 compilers? to make sure you can call the
> function indirectly with the check?
> Or is there some extra code that is needed to support that?
> That is you compile one side with say clang and the other side with
> GCC and you try to invoke the functions indirectly?

Oh, very cool. I didn't know about this infrastructure! I've added
compat tests now.

-- 
Kees Cook

Reply via email to