Summary: TypeInfo.init() returns invalid array
           Product: D
           Version: 1.044
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

Sometimes, the array TypeInfo.init() returns has a length, but ptr is null.
Accessing an element of such an array causes segfaults. This can't be right.
TypeInfo.init() should just return an empty array.

Example follows. This outputs "ptr=0000 length=4".

import std.stdio;

struct X {
   int y;

void main() {
   TypeInfo ti = typeid(X);
   writefln("ptr=%s length=%s", ti.init.ptr, ti.init.length);

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to