www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23057] New: importC: dmd segfault on invalid syntax

https://issues.dlang.org/show_bug.cgi?id=23057

          Issue ID: 23057
           Summary: importC: dmd segfault on invalid syntax
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi
                CC: duser neet.fi

these 6 characters:

(a[0])

Program received signal SIGSEGV, Segmentation fault.
0x0000000000744138 in Type::isTypeSArray() (this=0x0) at src/dmd/mtype.d:2703
2703            inout(TypeSArray)     isTypeSArray()     { return ty == Tsarray
   ? cast(typeof(return))this : null; }
(gdb) bt


(this=0x7fffffffcc08, t=0x0) at src/dmd/cparse.d:2620

(this=0x7fffffffcc08, t=0x0) at src/dmd/cparse.d:2513

specifier=..., pident= 0x7fffffffcd40: 0x7ffff7b666b0, t=0x0,
declarator=<incomplete type>) at src/dmd/cparse.d:2666

dmd.cparse.(...).CParser.cparseDeclaration(dmd.cparse.CParser!(dmd.astcodegen.ASTCodegen).CParser.LVL)
(this=0x7fffffffd0e0, level=<incomplete type>) at src/dmd/cparse.d:1669

src/dmd/cparse.d:128

(this=0x7ffff7b66430) at src/dmd/dmodule.d:963


(params=..., argv=0x7fffffffdd28, argc=2) at src/dmd/mars.d:359


line numbers at commit 035a9efa1c404c90e5c0140f939cb02d02f1cc15

--
Apr 24 2022