[omniORB] Segmentation fault when marshalling a string from python
Duncan Grisby
duncan at grisby.org
Mon Jan 11 10:54:17 GMT 2010
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.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list