D - Bug report: NPE on legal code
- Jeroen van Bemmel (22/22) Jan 25 2003 On my system (Win 2000) dmd crashes when compiling an adapted version of
On my system (Win 2000) dmd crashes when compiling an adapted version of gc2\gc.d: Object _d_newclass(ClassInfo ci) { void *p; debug(PRINTF) printf("_d_newclass(ci = %p)\n", ci); /* if (ci.flags & 1) // if COM object { // p = (Object)c.stdlib.malloc(ci.init.length); if (!p) _d_OutOfMemory(); } else { // p = _gc.malloc(ci.init.length); debug(PRINTF) printf(" p = %p\n", p); // _gc.setFinalizer(p, &new_finalizer); } */ I commented out the calls to malloc/gc, and when I remote the '/*' and '*/' the compiler crashes with a NPE
Jan 25 2003