DMD 1.001 release

Oskar Linde oskar.lindeREM at OVEgmail.com
Wed Jan 24 02:53:10 PST 2007


Walter Bright wrote:
> New pointer-aware GC. Should run significantly faster for some programs.

Thank you! I'm sure this will be a tremendous improvement.

Unfortunately, the new GC results in segfaults for me. I was lucky to 
track it down and generate a small test case:

class C {
     private char[][char[]] data;
     void add(char[] a, char[] b) { data[a] = b; }
}

void main() {
     for (int i = 0; i < 1000; i++) {
         auto c = new C;
         for (int j = 0; j < 1000; j++) {
             c.add("test".dup,"test".dup);
         }
     }
}

It seems the ClassInfo.flags are incorrectly set to 2 when only private 
data members contain pointers.

/Oskar



More information about the Digitalmars-d-announce mailing list