File contents: d o(int[a]a)(){} Compiling this with `dmd -c -o- /tmp/derr.d` with DMD 2.070.2 on x86-64 Linux causes DMD to pause for roughly two seconds, then exit with a segfault and no other output. Found by American Fuzzy Lop
This code also has similar results: v o(int a[a])(){}
This is caused by an infinite recursion ddmd.mtype.semanticLength -> VarExp::semantic -> TypeAArray::semantic -> TypeSArray::semantic -> ddmd.mtype.semanticLength. Probably due to the construct `int[a] a` which depends upon itself.
pull : https://github.com/dlang/dmd/pull/9365
dlang/dmd pull request #9365 "fix issue 15875 - case of undetected circular reference in function parameter" was merged: https://github.com/dlang/dmd/pull/9365
dlang/dmd pull request #10046 "[dmd-cxx] Backport semanticRun refactoring and recursive semantic SEGV bug fixes" was merged into dmd-cxx: - d79274a3f3bef5873821f2017a13dff6ac6077a0 by Basile Burg: fix issue 15875 - case of undetected circular reference in function parameter https://github.com/dlang/dmd/pull/10046