Skip to content

Fuzzer crashes #3892

Description

@aleksisch

Crashes found by the grammar fuzzer against bdbad337f. Repros are complete files; run with plain daslang repro.das.

1. SIGSEGV in SourceCollector::preVisit(ExprCall*) — self-referential typedef in a struct template

struct template r{def v=>0
typedef r=r<iterator<a>[@{0=(0,C())}]>}
$ daslang repro.das
CRASH: SIGSEGV (Segmentation fault) (signal 11) at address 0x80

#0  das::SourceCollector::preVisit(das::ExprCall*)
#1  das::ExprCall::visit(das::Visitor&)
#2  das::appendSources(...)
#3  das::AliasMarker::preVisit(das::ExprMakeTuple*)

Reached through alias marking, not type inference. The fault address (0x80) and the shallow backtrace rule out stack exhaustion, so this is a null dereference rather than the recursion seen in #3858.

Each part is load-bearing: dropping template, the iterator<>, the [...] dimension, or the undefined call C() all turn it into a normal compile error.

Minimized with afl-tmin (590 -> 110 bytes) then reduced by hand.

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