[omniORB] omniORBpy bug in boolean marshalling

Duncan Grisby duncan at grisby.org
Fri Aug 12 14:37:45 BST 2005


On Friday 12 August, Luke Deller wrote:

> I was getting python OverflowErrors at apparently random places of code,
> which shouldn't be able to produce this error.  This can happen if a C
> extension does not correctly handle the error produced by Py(Int|
> Long)_AsLong and friends.  I'm not sure if omniORBpy was the C extension
> causing this problem for me, but in any case I checked through
> omniORBpy's source code and found that it *does* contain this bug, in
> the code for marshalling a boolean value (and for arrays and sequences
> of booleans).  It will fail if a python long object is passed for a
> boolean value, where the long object is greater than sys.maxint or less
> than -sys.maxint-1.

That is indeed a bug. It's already been fixed in CVS.

> On a side note, are there any plans for mapping CORBA booleans to Python
> booleans (where available)?  I know that the CORBA python language
> mapping is quite old and predates the existence of a python boolean
> type.

Coincidentally, I implemented that in the omnipy3_develop branch
yesterday. If you get it (and omniORB on the omni4_1_develop branch)
you'll find CORBA booleans mapped to bool on Python versions that have
it.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list