[omniORB] segmentation fault on shutdown with gcc 3.2.3

Janet Tvedt tvedt at noao.edu
Fri Mar 26 16:39:31 GMT 2004


Yes, I recompiled omniORB.  I have also tried omniORB_305.

It dies in corba.h (see arrow in code snippet below).

      _CORBA_MODULE_FN inline void release(Object_ptr o) {
        if( o && !o->_NP_is_nil() ) {
====>     if( o->_NP_is_pseudo() )  o->_NP_decrRefCount();
           else  omni::releaseObjRef(o->_PR_getobj());
        }
      }


The segmentation fault occurs when the main program is exiting.  
ddd reports that it is in __static_inialization_and_destruction_0
(__initialize_p=0, --priority=65535) at corba.h:2568 which is the line
identified above.

My class has the reference to the orb, boa and root context of the
naming service declared as static.  If I make these non-static the
problem goes away.

Class Comm
{
   ...

   private:
	static CORBA::ORB_var orb;
         static CORBA::BOA_VAR boa;
         static CosNaming::NamingContext_var rootContext;
}


Janet

On Fri, 2004-03-26 at 06:39, Duncan Grisby wrote:
> On Monday 22 March, Janet Tvedt wrote:
> 
> > I have an application that worked fine with an older compiler (gcc 2.96)
> > but generates a segmentation fault on shutdown when compiled with gcc
> > 3.2.3.
> 
> Have you rebuild omniORB itself with gcc 3.2.3?  If not, that is a
> good first thing to try.
> 
> The next thing is to run under gdb so you can see where the segfault
> happens.
> 
> Cheers,
> 
> Duncan.



More information about the omniORB-list mailing list