[omniORB] Segmentation fault when marshalling a string from python

Floris Bruynooghe floris.bruynooghe at gmail.com
Mon Jan 11 19:22:53 GMT 2010


On Mon, Jan 11, 2010 at 10:54:17AM +0000, Duncan Grisby wrote:
> On Sun, 2010-01-10 at 15:53 +0000, Floris Bruynooghe wrote:
> 
> > When running this script in Python I get a segementation fault:
> > """
> > import omniORB
> > import CORBA
> > 
> > omniORB.cdrMarshal(CORBA.TC_string, 'foo')
> > """
> > 
> > The problem is in pyMarshal.cc:marshalPyObjectString(), the stream
> > object there has a pd_tcs_c member with NULL as value, which is what I
> > think causes the segfault.  But I'm afraid I don't understand enough
> > of the iternals to make much more out of this.  Can anybody help find
> > out what is going on?
> 
> You need to call CORBA.ORB_init() first. The segfault is caused by it
> trying to access code set information that is set up by ORB_init().
> 
> It would be nice if it threw an exception rather than giving a segfault,
> but I don't really want to add a check for it because that would involve
> adding an extra test along the call chain of some really
> performance-critical code.

Ah, thanks!  May I suggest adding something to that effect to the
docstring of cdrMarshal?  (I would create a patch but it seems a bit
trivial)

Regards
Floris


-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org



More information about the omniORB-list mailing list