Skip to content

fuzzer: the trace API hashes scalars only, so a third of every sweep is refused before it reaches the device #791

Closed

Description

@alejandro-soto-franco

The differential fuzzer's trace API hashes 16 scalar types and nothing else. A generated program whose dump site or return position holds a tuple or an array is refused at the adapter, before it ever reaches the device:

UNSUPPORTED [adapter] unsupported dumped type for Stage 2 adapter: [i8; 1]

Scale

Measured on the checked-in configuration, which has had composite_count = 3 since #766:

window PASS UNSUPPORTED
seeds 300-359 42 18
seeds 1000-1999 673 320

Roughly a third of every sweep is refused for this reason alone. The generator produces those programs, the backend compiles them, and the harness declines to compare them.

Why it matters here rather than as a nicety

The most valuable find this fuzzer has produced, the silent miscompile behind #393, lived in aggregate constants with padding. composite_count = 3 puts aggregates back into the generated programs, and the trace boundary is now the thing keeping them away from the comparison.

What a fix has to respect

An aggregate should fold as its leaves rather than as its bytes. Padding is uninitialised, so folding raw bytes would be undefined behaviour in the CPU oracle, and any layout the two backends pad differently would report a MISMATCH on every seed that touched it. That would turn the exact-comparison property the trace rests on into a source of false positives, in the same way a ULP tolerance would have in #395.

A pointer stays refused whatever else is widened. The CPU oracle and the device hold different addresses for the same object by construction, so a pointer folded into the trace could never compare equal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions