digitalmars.D.bugs - [Issue 7568] New: pragma(msg) segfaults with an aggregate including a class.
- d-bugmail puremagic.com (34/34) Feb 23 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7568
- d-bugmail puremagic.com (10/10) Feb 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7568
- d-bugmail puremagic.com (8/8) Feb 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7568
- d-bugmail puremagic.com (9/9) Feb 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7568
http://d.puremagic.com/issues/show_bug.cgi?id=7568 Summary: pragma(msg) segfaults with an aggregate including a class. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE, ice Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: kennytm gmail.com --- Comment #0 from kennytm gmail.com 2012-02-23 11:02:13 PST --- Test cases: ----------------------------------------------- class C7568 {} struct S7568 { C7568 c; } auto test7568a() { return [new C7568]; } auto test7568b() { return S7568(new C7568); } pragma(msg, test7568a()); pragma(msg, test7568b()); ----------------------------------------------- This will cause a segmentation fault: test.d(4): Error: C7568 class literals cannot be returned from CTFE Segmentation fault This happens because an Expression* is assigned to the value 0x1, and the function 'argsToCBuffer' is trying to access the expression without first checking if the expression is a valid pointer. The program should simply fail to compile, without the segfault. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 23 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7568 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-02-29 19:15:25 PST --- https://github.com/D-Programming-Language/dmd/pull/774 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7568 --- Comment #2 from github-bugzilla puremagic.com 2012-02-29 23:35:04 PST --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8fadb858512dda3f2c697a6b55bb5d2369c18995 fix Issue 7568 - pragma(msg) segfaults with an aggregate including a class. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7568 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 29 2012