Improper Virtual function calling in Linux with GCC 3.3.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I have created 64 bit binary along with shared libraries.
The System I am using is Intel EM64T( Suse Linux Enterprise Server 9)
GCC 3.3.3


When running the application it is giving SIGSEGV.
The IpVtbl pointer is pointing to improper virtual functions.

The below backtrace shows the details


gdb ./SEA
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...Using host
libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) r -l INIT.sco,AXEMANAGER.sco,RTS.sco,SCHR.sco -p 5000 -e
node-name=aa,network-manager-host=stesuse19,network-manager-mph-port=41196,config-file=/home/tcsgoab/21230/simple_config.axe
Starting program: /vobs/tsp/sea/seaCore/osCore/bin/SEA -l
INIT.sco,AXEMANAGER.sco,RTS.sco,SCHR.sco -p 5000 -e
node-name=aa,network-manager-host=stesuse19,network-manager-mph-port=41196,config-file=/home/tcsgoab/21230/simple_config.axe
DISPLAY set to :0.0
LD_LIBRARY_PATH set to
/lib:/lib64:/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64
Loading library: INIT.sco
Program received signal SIGSEGV, Segmentation fault.
0x000000000040c7d3 in SCS_FindHandle (pif=0x2a965d8f20) at
ClassObjects.c:554
554       SCS_Release(IUnknown, pUnk);

BACKTRACE :

#0  0x000000000040c7d3 in SCS_FindHandle (pif=0x2a965d8f20) at
ClassObjects.c:554
#1  0x0000002a964d1cd1 in TicFactory::getMyHandle (this=0x2a965d8f20) at
Tic_factory.cc:245
#2  0x0000002a964d19fb in TicFactory::CreateNamedInterp (this=0x2a965d8f20,
    name=0x2a95a41518 "\b\025\225*", attributes=5683936, creator=0x56bae0,
iid=@0xf501,
    ppv=0x56bac0) at Tic_factory.cc:127
#3  0x000000000040c44e in SCS_RegisterClassObject (layer=1,
    name=0x565140 "b04c1362-7ee6-11d3-827a-08002082b68e",
refCLSID=0x56baa0,
    componentNode=0x5650e0, iunknownPtr=0x2a965d8f20) at ClassObjects.c:399
#4  0x000000000040e4c9 in SCS_ActivateComponent (rclsid=0x2a964ca7a0,
handle=0x5650e0,
    info=0x565090) at Components.c:934
#5  0x000000000040e6a3 in SCS_CoGetClassObject (rclsid=0x2a964ca7a0,
dwClsContext=1,
    pcsi=0x0, riid=0x2a963c9380, ppv=0x7fbfffd870) at Components.c:1001
#6  0x0000002a963c0e12 in StartServer (context=0x56b330) at
HttpdInstance.c:389
#7  0x0000002a963c0ac3 in InstanceAddRef (pif=0x56b330) at
HttpdInstance.c:280
#8  0x0000002a963c0a35 in InstanceQueryInterface (pif=0x56b330,
riid=0x417ef0,
    ppv=0x2a960cf798) at HttpdInstance.c:255
#9  0x000000000040e8ef in SCS_CreateNamedInstance (rclsid=0x2a960cf150,
pUnkOuter=0x0,
    name=0x2a95fce5a8 "HTTPServer", riid=0x417ef0, ppv=0x2a960cf798) at
Components.c:1074
#10 0x0000002a95fcdde6 in Init::InitialLoad (this=0x2a960cf790) at
Init.cc:111
#11 0x000000000040c44e in SCS_RegisterClassObject (layer=1,
    name=0x565b80 "bece4b2e-1cbf-11d2-b08c-0800207d1289",
refCLSID=0x56ac30,
    componentNode=0x565b20, iunknownPtr=0x2a960cf790) at ClassObjects.c:399
#12 0x000000000040e4c9 in SCS_ActivateComponent (rclsid=0x565ad0,
handle=0x565b20,
    info=0x565ad0) at Components.c:934
#13 0x000000000040e6a3 in SCS_CoGetClassObject (rclsid=0x565ad0,
dwClsContext=1, pcsi=0x0,
    riid=0x417ef0, ppv=0x7fbfffdb28) at Components.c:1001
---Type <return> to continue, or q <return> to quit---
#14 0x000000000040ec0a in SCS_LoadInitialComponent (fileName=0x7fbfffdb80
"INIT.sco")
    at Components.c:1196
#15 0x000000000040737f in LoadInitialComponents (
    initCompList=0x7fbffff39c "INIT.sco,AXEMANAGER.sco,RTS.sco,SCHR.sco")
at main.c:700
#16 0x00000000004077a7 in main (argc=7, argv=0x7fbfffecc8) at main.c:941
(gdb)  p *pif->lpVtbl
$2 = {offset = 182910261366, pRuntimeTypeInformation = 0x2a964d195e,
  QueryInterface = 0x2a964d196e <TicFactory::Release()>,
  AddRef = 0x2a964d197e <TicFactory::CreateNamedInterp(char const*, int,
IUnknown*, GUID const&, void**)>,
  Release = 0x2a964d1a90 <TicFactory::CreateNamedNodeInterp(char const*,
int, void*, GUID const&, void**)>, epilog = 182910262122}

Here you can see that the lpVtbl pointer

If we call QueryInterface , it is calling Release() function.

This seems to be improper virtual functions mapping.

Can any body let us know about this issue.
This is a very priority issue for us.

Thanks & Regards
Govind

Govind Manik Rao Abkari
Tata Consultancy Services Limited
Mailto: govind.abkari@xxxxxxx
Website: http://www.tcs.com


Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux