www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 2536] New: ClassInfo.interfaces contains null sub-ClassInfos

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

           Summary: ClassInfo.interfaces contains null sub-ClassInfos
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: blocker
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: fvbommel wxs.nl


See the following code:
-----
module test;

interface IConduit : InputStream {
}

interface InputStream {}

void main() {
    auto ci = IConduit.classinfo;
    // passes:
    assert(ci.interfaces.length == 1, "length not 1");
    // fails on gdc (but not dmd):
    assert(ci.interfaces[0].classinfo !is null, "value is null");
}
-----
Ubuntu 8.10 x86_64, gdc-4.2 from Ubuntu repository (4.2.4 20080705 (prerelease
gdc 0.25 20080312, using dmd 1.024) (Ubuntu 0.25-4.2.4-3.1)).

Both asserts pass on DMD (v1.024 and v1.038), but the second one fails when
compiled using GDC.

This is with Tango installed, in case it matters.

This causes segfaults in Tango's Buffer.share() (via cast(Buffered) ==>
_d_dynamic_cast ==> _d_isbaseof2) :(


-- 
Dec 22 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2536





------- Comment #1 from larsivar igesund.net  2008-12-22 17:03 -------
I think this one has been fixed in a later revision? Look in the closed
reports.


-- 
Dec 22 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2536





------- Comment #2 from fvbommel wxs.nl  2008-12-22 18:48 -------
Thanks for that. It does indeed look suspiciously like #1844. So I guess if the
version Ubuntu ships is < r212 (which fixed that one) this should be marked as
a duplicate of that...


-- 
Dec 22 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2536


fvbommel wxs.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




------- Comment #3 from fvbommel wxs.nl  2008-12-22 18:57 -------
Okay, given that the date (20080312) in the version is before r212 was
committed this definitely looks like a dupe.

*** This bug has been marked as a duplicate of 1844 ***


-- 
Dec 22 2008