This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Seg fault using vtable thunks
- To: egcs-bugs at cygnus dot com
- Subject: Seg fault using vtable thunks
- From: Christopher Grinton <cgg at osa dot com dot au>
- Date: Tue, 09 Dec 1997 19:52:52 -1000
Guys,
First of all, thanks for the good work you are all doing witn egcs!
I have found a problem using vtable thunks with the program attached
below. The call sequence should be as follows (ignoring implicit
ctors, each function is called by the previous function in this list):
main
A::A()
C::Csf()
C::ACvf()
C::Cvf()
However, when I compile normally (-fvtable-thunks) turned on, the
last virtual call to Cvf causes a seg fault. Compiling with
-fno-vtable-thunks works fine.
My system info:
# egcs -v
Reading specs from /usr/local/packages/egcs/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.02/specs
gcc version egcs-2.91.02 971206 (gcc-2.8.0)
# ./config.guess
i486-pc-linux-gnu
# uname -a
Linux phoenix.osa.com.au 2.0.30 #1 Tue Nov 18 14:29:02 EST 1997 i486 unknown
I know there was some discussion in the mailing list a while back
about vtable thunks and linux; sorry if I am reporting an already
known problem.
A few questions: Is there a work around to avoid this bug? Is there an
option to configure to compile egcs with a default of
-fno-vtable-thunks? Is it safe to compile my application with
-fno-vtable-thunks if I am not using libstdc++?
Thanks for any info,
Chris
------------------------------------------------------------
Christopher Grinton cgg@osa.com.au
Open Software Associates Limited
29 Ringwood Street / PO Box 4414 Phone +613 9871 1646
Ringwood, VIC 3134, AUSTRALIA Fax +613 9871 1711
------------------------------------------------------------
Deploy Applications across the Internet and Intranets!
Visit our Web site at http://www.osa.com
t.cxx