type_info not initialized
Martin v. Loewis
martin@mira.isdn.cs.tu-berlin.de
Sun Oct 31 23:03:00 GMT 1999
> I am stuck with this one - but I also need it to be fixed :/, I can't find
> a work around of this case either. Can someone help me to fix this?
> With ideas, hints, things I could try. I can't provide a working example
> since I see no other way to do that than to give you my whole project --
> and that is simply not released yet :/
The bug reporting guide lines more or less apply to all reports: no
source, no bugfix. This is not an arbitrary decision, there is simply
nothing I can do, and I doubt that others can be more helpful.
> I have the latest (cvs) egcs tree here. Just tell me what to do to debug
> gcc for this case :)
I recommend reading the section "Reporting Bugs" of the GCC manual;
especially the part where it talks about assembler files. Find out
into what file the typeinfo is generated, then inspect the generated
assembler file.
If the class has a virtual table, first locate the virtual table. Then
you'll see the name of the typeinfo function, which initialises the
typeinfo structure. See whether it has the right string in it.
If the class has no virtual table, the typeinfo function is emitted in
the same translation unit that also has the typeid() expression.
One more hint: If the object is overwritten in memory (e.g. the vtable
field gets corrupted), the typeid call will also break.
Regards,
Martin
More information about the Gcc-bugs
mailing list