www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3042] New: Segfault on incorrect override

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3042

           Summary: Segfault on incorrect override
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ar_other mail.ru


The following segfaults the compiler

class Base {
    abstract int str();
}
class Derived : Base {
    override str() {
        return "string";
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 31 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3042


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug yahoo.com.au




--- Comment #1 from Don <clugdbug yahoo.com.au>  2009-07-20 02:58:08 PDT ---

mtype.c, 3699 in DMD2.031. Crashing because t1->next is null.

    Type *t1n = t1->next;
    Type *t2n = t2->next;
+   if (!t1n || !t2n) goto Lnotcovariant;

    if (t1n->equals(t2n))
    goto Lcovariant;

---
It might be appealing to "return 3;" instead of "goto Lnotcovariant; (which
returns 2)", but that's incorrect. The code below should be accepted:

class Base {
    int str();
}
class Derived : Base {
    auto str() {
        return 3;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 20 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3042


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarrett.billingsley gmail.c
                   |                            |om




--- Comment #2 from Don <clugdbug yahoo.com.au>  2009-08-12 08:51:45 PDT ---
*** Issue 3247 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3042


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |2korden gmail.com




--- Comment #3 from Don <clugdbug yahoo.com.au>  2009-09-04 00:26:13 PDT ---
*** Issue 3296 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 04 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3042


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #4 from Walter Bright <bugzilla digitalmars.com> 2009-10-13
13:51:54 PDT ---
Fixed dmd 2.034

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 13 2009