digitalmars.D.bugs - [Issue 4728] New: Crash by protected/private constructor in an other module
- d-bugmail puremagic.com (71/72) Aug 26 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4728
- d-bugmail puremagic.com (11/11) Oct 05 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4728
- d-bugmail puremagic.com (9/11) Oct 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4728
- d-bugmail puremagic.com (13/13) Nov 03 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4728
- d-bugmail puremagic.com (12/12) Nov 11 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4728
http://d.puremagic.com/issues/show_bug.cgi?id=4728 Summary: Crash by protected/private constructor in an other module Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: rayerd.wiz gmail.com PDT --- // a.d import b; void main() { new A(); } // b.d class A { protected this(){} } When these source codes are compiled with dmd trunk r628, dmd outputs a correct error message and crashes.dmd a ba.d(4): Error: class b.A member this is not accessible <-- crash!! The cause of the crash is an access to the null pointer as shown below. // toctype.c ... type *TypeFunction::toCtype() { type *t; if (ctype) return ctype; if (1) { param_t *paramtypes; tym_t tyf; type *tp; paramtypes = NULL; size_t nparams = Parameter::dim(parameters); for (size_t i = 0; i < nparams; i++) { Parameter *arg = Parameter::getNth(parameters, i); tp = arg->type->toCtype(); if (arg->storageClass & (STCout | STCref)) { // C doesn't have reference types, so it's really a pointer // to the parameter type tp = type_allocn(TYref, tp); } param_append_type(¶mtypes,tp); } tyf = totym(); t = type_alloc(tyf); t->Tflags |= TFprototype; if (varargs != 1) t->Tflags |= TFfixed; ctype = t; t->Tnext = next->toCtype(); // <<<<<<<<<<<<<<<< next is null t->Tnext->Tcount++; t->Tparamtypes = paramtypes; } ctype = t; return t; } ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 26 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4728 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug yahoo.com.au I cannot reproduce this. For me on Windows, it prints the error message, but does not crash. Perhaps the test case is slightly wrong? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 05 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4728 PDT ---I cannot reproduce this. For me on Windows, it prints the error message, but does not crash. Perhaps the test case is slightly wrong?Oh really? Now, I performed it with dmd r712, druntime r398, and phobos r2092. dmd crashed again within an error message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 09 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4728 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch This is a silly one! This only appears in debug mode, it because Walter accidentally left a call to "halt()". access.c, line 256. This ICE can never occur in a release version of the compiler. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 03 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4728 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED 19:26:20 PST --- http://www.dsource.org/projects/dmd/changeset/751 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 11 2010