This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19604] New: vtable error with virtual inheritance and tables


I don't know if it's a bug in g++ or a lack in the specifications of C++ ...

I define two classes, one inherited from the second. I allocate a table of the
child, I give it to a fonction that waits for the parent class.

Inside this function, when I try to access virtual functions of an element of
the table other than the first, I get a segfault.
It seems to be that in this function, the size of each element of the table is
considered to be the one of the parent but not the one of the child. That
induces a memory shift that segfault when trying to accessing the vtable ...

Is there the size of the object inside the vtable ?

-- 
           Summary: vtable error with virtual inheritance and tables
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: webmyster at addoc dot u-psud dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19604


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]