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]

Re: Error with vtable thunks in EGCS under Linux


I think you were misled, this is a serious bug for any program using virutal
inheritence.   I see no good work-arounds for our code.  It is all Fresco
based, and crashes in multiple places.  Why is it too late to turn back?  

There may be others who have seen the bug, but have not reported it.
I suffered from it several months ago, but never reported it.  It was
hard to reproduce in a small test case, and I figured egcs was just unstable,
so I would wait for the next release of egcs.  However, egcs is a good
compiler, and works great on suns.


Recompiling everything on the system seems a bit intractable.
There must be a better way.  Do you think this would work:
- compile a glibc and libstdc++, then rename them to glibcnothunk
libstdc++-nothunk, then if you are on linux and use -fno-vtable-thunks, egcs
uses those libraries instead of the system libraries.  Then put this
into the standard release of egcs on linux.  It would behave like this:

egcs -fno-vtable-thunks // use the nothunk libs
egcs -fvtable-thunks    // do what it does now.

Currently, on linux, -fno-vtable-thunks is really not an option...


-Bill

H.J. Lu writes:
> > 
> > This message describes my unsuccessful attempts to work around the
> > vtable-thunks bug in EGCS v1.1.1 on Linux (RedHat 5.1).  This is a very
> > serious bug for us any anyone considering using virtual inheritance, EGCS,
> 
> When I asked about the vtable-thunks bug when we switched to
> vtable-thunks, I was told
> 
> 1. Noone was working on it.
> 2. Hardly anyone would see the bug. If they did, they could find a
> work around.
> 
> Maybe I was misled :-(. But it is too late now, we cannot go back.
> 
> > and Linux.  In summary, -fvtable-thunks are known to be broken, and it
> > seems impossible to use -fno-vtable-thunks under Linux. Does anyone have
> > any idea how to get code to compile with -fno-vtable-thunks on Linux?
> > 
> > Thanks in advance,
> 
> Since glibc is tied to libstdc++, you have to recompile your glibc
> and maybe everything on your system.
> 
> 
> H.J.
> 


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