digitalmars.D.bugs - [Issue 4093] New: Segfault(interpret.c): with recursive struct templates
- d-bugmail puremagic.com (28/28) Apr 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4093
- d-bugmail puremagic.com (15/15) Apr 20 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4093
- d-bugmail puremagic.com (11/11) May 05 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4093
- d-bugmail puremagic.com (12/12) Sep 05 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4093
- d-bugmail puremagic.com (12/12) Apr 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4093
- d-bugmail puremagic.com (15/17) Dec 23 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4093
http://d.puremagic.com/issues/show_bug.cgi?id=4093 Summary: Segfault(interpret.c): with recursive struct templates Product: D Version: 2.040 Platform: Other OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: clugdbug yahoo.com.au struct Zug(int Z){ const void * bahn = Bug4093!(0).hof.bahn; } struct Bug4093(int Q){ Zug!(0) hof; } const a = Zug!(0).bahn; ==== crash.d(220): Error: 'this' is only defined in non-static member functions, not crash crash.d(220): Error: this for hof needs to be type Bug4093 not type int -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 15 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4093 This bug is completely fixed by the patch to 4094. However, I think this bug does reveal another problem which is also worth fixing. The segfault itself can also be fixed with this patch to expression.c line 280. The error message it gives is nonsense (so the patch to bug 4094 fixes that), but I think adding more ErrorExps is no bad thing, and may prevent another future crash. e1->error("this for %s needs to be type %s not type %s", var->toChars(), ad->toChars(), t->toChars()); + e1 = new ErrorExp(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4093 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed DMD2.044 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 05 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4093 siegelords_abode yahoo.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |siegelords_abode yahoo.com The test code in the original comment does not compile on DMD2.048 (Error: variable hof cannot be read at compile time) and causes a segfault in DMD1.063. Is this bug really fixed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 05 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4093 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | Although this bug is fixed in D2, it is NOT fixed for D1 (where it generates a stack overflow). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 28 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4093 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXEDAlthough this bug is fixed in D2, it is NOT fixed for D1 (where it generates a stack overflow).Don't know why I thought that. This bug never existed on D1. The stack overflow only occurs on a debug version of DMD; on a release DMD, it generates a "recursive template expansion" error. There's no difference between D1 and D2; change the 'const void *' to 'enum void *' to see the D1 behaviour in D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 23 2011