This is the mail archive of the gcc@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: need help debugging


Are you SURE you

1) compiled everything with the same compiler
2) use the same version of gcc for linking as that you use to compile
   your C++ source files with?

I once had a problem where I compiled the C++ code with CXX=g++-3.0,
but things got linked with CC=gcc (which was version 2.96).
As a result, the application crashed.

On Sat, May 19, 2001 at 04:37:17PM +0200, Michael Ritzert wrote:
> Hi all,
> 
> I've run into problems compiling ORBacus using CVS gcc, both HEAD and
> branch. The build stops when it tries to run the just compiled idl compiler
> for the first time and it crashes with a seg fault. gcc 2.95.3 works just
> fine, so I think this is a compiler bug and a regression.
> The problem exists for at least 2 weeks now. gcc CVS from 2000-12-17 works
> fine.
> 
> I've run the command in a debugging session and got this (run through
> c++filt):
> 
> (gdb) r
> Starting program: /home/ritzert/compile/apathix.realtech.de/OB-4.0.5/ob/src/imr/../../bin/idl -I. --dll-import OB_IMR_IMPORT -I../../idl --this-header-dir OB ../../idl/OB/IMR.idl
>  
> Program received signal SIGSEGV, Segmentation fault.
> 0x40146492 in CORBA::Container_impl::Container_impl(CORBA::ORB*, PortableServer::POA*, CORBA::Repository_impl*) (this=0x8152e5c, __vtt_parm=0x402990e8, orb=0x8124870,
>     poa=0x814f3b8, r=0x0) at IFR2_impl.cpp:408
> 408   {
> (gdb) bt
> #0  0x40146492 in CORBA::Container_impl::Container_impl(CORBA::ORB*, PortableServer::POA*, CORBA::Repository_impl*) (this=0x8152e5c, __vtt_parm=0x402990e8, orb=0x8124870,
>     poa=0x814f3b8, r=0x0) at IFR2_impl.cpp:408
> #1  0x40174d43 in CORBA::Repository_impl::Repository_impl(CORBA::ORB*, PortableServer::POA*)
>     (__vtt_parm=0x8152de0, orb=0x8124870, poa=0x814f3b8) at IFR3_impl.cpp:67
> #2  0x805f5c8 in run(CORBA::ORB*, int, char**) (orb=0x8124870, argc=8,
>     argv=0xbffff554) at IDL.cpp:564
> #3  0x8060a8d in main (argc=8, argv=0xbffff554) at IDL.cpp:744
> 
> Hmm, not really enlightening...
> 
> Ok, my next step was to use objdump to look at the generated code (in a
> .so):
> 
> 00131400 <CORBA::Container_impl::Container_impl(CORBA::ORB*, PortableServer::POA*, CORBA::Repository_impl*)>:
>  
> Container_impl::Container_impl(ORB_ptr orb,
>                                POA_ptr poa,
>                                Repository_impl* r)
>     : IRObject_impl(orb, poa, r)
>   131400:   55                      push   %ebp
>   131401:   89 e5                   mov    %esp,%ebp
>   131403:   57                      push   %edi
>   131404:   56                      push   %esi
>   131405:   53                      push   %ebx
>   131406:   83 ec 2c                sub    $0x2c,%esp
>   131409:   e8 1e 6d 01 00          call   14812c <_GLOBAL__D__ZN5CORBA14Contained_implC2EPNS_3ORBEPN14PortableServer3POAEPNS_14Container_implEPNS_15Repository_implE+0x1c>
>   13140e:   81 c3 42 7a 1f 00       add    $0x1f7a42,%ebx
>   131414:   8b 55 08                mov    0x8(%ebp),%edx
> {
>   131417:   8b 45 0c                mov    0xc(%ebp),%eax
>   13141a:   8b 00                   mov    (%eax),%eax
>   13141c:   89 02                   mov    %eax,(%edx)
>   13141e:   8b 02                   mov    (%edx),%eax
>   131420:   2d 8c 00 00 00          sub    $0x8c,%eax
>   131425:   8b 08                   mov    (%eax),%ecx
>   131427:   8b 45 0c                mov    0xc(%ebp),%eax
>   13142a:   83 c0 04                add    $0x4,%eax
>   13142d:   8b 00                   mov    (%eax),%eax
>   13142f:   89 04 11                mov    %eax,(%ecx,%edx,1)
>   131432:   8b 32                   mov    (%edx),%esi
>   131434:   81 ee 8c 00 00 00       sub    $0x8c,%esi
>   13143a:   8b 02                   mov    (%edx),%eax
>   13143c:   2d 8c 00 00 00          sub    $0x8c,%eax
>   131441:   8b 00                   mov    (%eax),%eax
>   131443:   8b 0c 10                mov    (%eax,%edx,1),%ecx
>   131446:   83 e9 48                sub    $0x48,%ecx
>   131449:   89 d0                   mov    %edx,%eax
>   13144b:   03 06                   add    (%esi),%eax
>   13144d:   8b 09                   mov    (%ecx),%ecx
>   13144f:   8d 0c 01                lea    (%ecx,%eax,1),%ecx
>   131452:   8b 45 0c                mov    0xc(%ebp),%eax
>   131455:   83 c0 08                add    $0x8,%eax
>   131458:   8b 00                   mov    (%eax),%eax
>   13145a:   89 01                   mov    %eax,(%ecx)
>   13145c:   8b 02                   mov    (%edx),%eax
>   13145e:   2d 8c 00 00 00          sub    $0x8c,%eax
>   131463:   89 45 f0                mov    %eax,0xfffffff0(%ebp)
>   131466:   8b 02                   mov    (%edx),%eax
>   131468:   2d 8c 00 00 00          sub    $0x8c,%eax
>   13146d:   8b 00                   mov    (%eax),%eax
>   13146f:   8b 3c 10                mov    (%eax,%edx,1),%edi
>   131472:   83 ef 48                sub    $0x48,%edi
>   131475:   8b 32                   mov    (%edx),%esi
>   131477:   81 ee 8c 00 00 00       sub    $0x8c,%esi
>   13147d:   8b 02                   mov    (%edx),%eax
>   13147f:   2d 8c 00 00 00          sub    $0x8c,%eax
>   131484:   8b 00                   mov    (%eax),%eax
>   131486:   8b 0c 10                mov    (%eax,%edx,1),%ecx
>   131489:   83 e9 48                sub    $0x48,%ecx
>   13148c:   89 d0                   mov    %edx,%eax
>   13148e:   03 06                   add    (%esi),%eax
>   131490:   03 01                   add    (%ecx),%eax
>   131492:   8b 08                   mov    (%eax),%ecx
>   131494:   83 e9 3c                sub    $0x3c,%ecx
>   131497:   89 d0                   mov    %edx,%eax
>   131499:   8b 75 f0                mov    0xfffffff0(%ebp),%esi
>   13149c:   03 06                   add    (%esi),%eax
>   13149e:   03 07                   add    (%edi),%eax
>   1314a0:   8b 09                   mov    (%ecx),%ecx
>   1314a2:   8d 0c 01                lea    (%ecx,%eax,1),%ecx
>   1314a5:   8b 45 0c                mov    0xc(%ebp),%eax
>   1314a8:   83 c0 0c                add    $0xc,%eax
>   1314ab:   8b 00                   mov    (%eax),%eax
>   1314ad:   89 01                   mov    %eax,(%ecx)
>   1314af:   8b 02                   mov    (%edx),%eax
>   1314b1:   2d 90 00 00 00          sub    $0x90,%eax
>   1314b6:   8b 08                   mov    (%eax),%ecx
>   1314b8:   8b 45 0c                mov    0xc(%ebp),%eax
>   1314bb:   83 c0 10                add    $0x10,%eax
>   1314be:   8b 00                   mov    (%eax),%eax
>   1314c0:   89 04 11                mov    %eax,(%ecx,%edx,1)
>   1314c3:   8b 32                   mov    (%edx),%esi
>   1314c5:   81 ee 90 00 00 00       sub    $0x90,%esi
>   1314cb:   8b 02                   mov    (%edx),%eax
>   1314cd:   2d 90 00 00 00          sub    $0x90,%eax
>   1314d2:   8b 00                   mov    (%eax),%eax
>   1314d4:   8b 0c 10                mov    (%eax,%edx,1),%ecx
>   1314d7:   83 e9 44                sub    $0x44,%ecx
>   1314da:   89 d0                   mov    %edx,%eax
>   1314dc:   03 06                   add    (%esi),%eax
>   1314de:   8b 09                   mov    (%ecx),%ecx
>   1314e0:   8d 0c 01                lea    (%ecx,%eax,1),%ecx
>   1314e3:   8b 45 0c                mov    0xc(%ebp),%eax
>   1314e6:   83 c0 14                add    $0x14,%eax
>   1314e9:   8b 00                   mov    (%eax),%eax
>   1314eb:   89 01                   mov    %eax,(%ecx)
>   1314ed:   8b 02                   mov    (%edx),%eax
>   1314ef:   2d 90 00 00 00          sub    $0x90,%eax
>   1314f4:   89 45 ec                mov    %eax,0xffffffec(%ebp)
>   1314f7:   8b 02                   mov    (%edx),%eax
>   1314f9:   2d 90 00 00 00          sub    $0x90,%eax
>   1314fe:   8b 00                   mov    (%eax),%eax
>   131500:   8b 3c 10                mov    (%eax,%edx,1),%edi
>   131503:   83 ef 44                sub    $0x44,%edi
>   131506:   8b 32                   mov    (%edx),%esi
>   131508:   81 ee 90 00 00 00       sub    $0x90,%esi
>   13150e:   8b 02                   mov    (%edx),%eax
>   131510:   2d 90 00 00 00          sub    $0x90,%eax
>   131515:   8b 00                   mov    (%eax),%eax
>   131517:   8b 0c 10                mov    (%eax,%edx,1),%ecx
>   13151a:   83 e9 44                sub    $0x44,%ecx
>   13151d:   89 d0                   mov    %edx,%eax
>   13151f:   03 06                   add    (%esi),%eax
>   131521:   03 01                   add    (%ecx),%eax
>   131523:   8b 08                   mov    (%eax),%ecx
>   131525:   83 e9 40                sub    $0x40,%ecx
>   131528:   89 d0                   mov    %edx,%eax
>   13152a:   8b 75 ec                mov    0xffffffec(%ebp),%esi
>   13152d:   03 06                   add    (%esi),%eax
>   13152f:   03 07                   add    (%edi),%eax
>   131531:   8b 09                   mov    (%ecx),%ecx
>   131533:   8d 0c 01                lea    (%ecx,%eax,1),%ecx
>   131536:   8b 45 0c                mov    0xc(%ebp),%eax
>   131539:   83 c0 18                add    $0x18,%eax
>   13153c:   8b 00                   mov    (%eax),%eax
>   13153e:   89 01                   mov    %eax,(%ecx)
>   131540:   83 ec 0c                sub    $0xc,%esp
>   131543:   8d 42 04                lea    0x4(%edx),%eax
>   131546:   50                      push   %eax
>   131547:   e8 90 c9 fb ff          call   ededc <_init+0x67e0>
>   13154c:   83 c4 10                add    $0x10,%esp
> }
> 
> now I really dont't know what it's doing here - I'm not even sure this
> is the correct part of the dump...
> 
> I really would like to help debugging this but could need a little
> inspiration what to do next. I won't file a PR until I can provide you
> quite a bit more information. Stripping down the problem to a small test
> case is probably not possible since this executable uses code from some
> 20 files.
> 
> My OS is i686-linux.
> 
> Regards,
> Michael

-- 
Carlo Wood <carlo@alinoe.com>


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