digitalmars.D.bugs - [Issue 5533] New: DMD segv: -gc, associative arrays, const pointers to self
- d-bugmail puremagic.com (46/46) Feb 06 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5533
- d-bugmail puremagic.com (11/11) Jul 03 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5533
- d-bugmail puremagic.com (7/7) Jul 25 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5533
- d-bugmail puremagic.com (7/7) Aug 26 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5533
- d-bugmail puremagic.com (12/12) Dec 19 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5533
http://d.puremagic.com/issues/show_bug.cgi?id=5533 Summary: DMD segv: -gc, associative arrays, const pointers to self Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: webmaster villagersonline.com --- Comment #0 from Russ Lewis <webmaster villagersonline.com> 2011-02-06 12:50:03 PST --- Regression from 2.050 to 2.051 (Linux). When compiling with -gc -c, the testcase below will cause 2.051 to segv. File compiles OK on 2.050. File also compiles just fine (even on 2.051) if -gc is omitted. DMD produces expected link errors if you compile with only -gc argument. The key issues appear to be: - The foreach loop inside the function. - The parent pointer in Foo must be *BOTH* const and a pointer to its own type. If you make it non-const, or a pointer to something else, it works. TESTCASE: void DMD_BUG_WORKAROUND() // issue 3770 { /* if you don't have a dummy function like this in the module where a type * was declared, then dmd won't give it to you when you use it in an * associative array elsewhere, and you'll get link errors. */ Foo tmp; string dummy; foreach(name; tmp.table.keys) dummy ~= name; } struct Foo { const(Foo) *parent; FooElem*[string] table; }; struct FooElem { }; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 06 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5533 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies gmail.com --- Comment #1 from yebblies <yebblies gmail.com> 2011-07-04 02:35:02 EST --- This works for me on win32 with dmd head (2.054). Can anybody reproduce this on linux with the current dmd? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 03 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5533 --- Comment #2 from Russ Lewis <webmaster villagersonline.com> 2011-07-25 21:45:17 PDT --- I tested this on 2.054 (Linux: Fedora 14 x86 32-bit), and the problem still exists. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 25 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5533 --- Comment #3 from Russ Lewis <webmaster villagersonline.com> 2011-08-26 13:50:27 PDT --- I built dmd and ran it under gdb, and it appears that the problem is infinite recursion in the function dwarf_typidx(TYPE*). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 26 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5533 klickverbot <code klickverbot.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |code klickverbot.at Resolution| |DUPLICATE --- Comment #4 from klickverbot <code klickverbot.at> 2011-12-19 10:08:15 PST --- *** This issue has been marked as a duplicate of issue 7127 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2011