[omniORB] Bug in the omniOrbPOA::create_new_key function ?
Serguei Kolos
Serguei.Kolos at cern.ch
Thu Oct 19 19:50:23 BST 2006
Hi
I'm using omniORB 4.0.7 on Linux and it seems that I get into trouble with
the Object ID manipulation. The problem is:
- I'm using my own POA with the System ID policy
- when I activate the first object in my process the Object key which
is created by the
omniOrbPOA::create_new_key function (poa.cc:2578) looks like "poa
id" + "object id" where
"object id" is the 4 bytes of the pd_oidIndex variable which
initially is set to 0.
_CORBA_ULong idx = pd_oidIndex;
...
memcpy(k + pd_poaIdSize, (const CORBA::Octet*) &idx,
SYS_ASSIGNED_ID_SIZE);
As a result the last 4 bytes of the Object key are 0 !!!!
- If I call the PortableServer::ObjectId_to_string function
(portableserver.cc:401) for this
object ID it throws the BAD_PARAM exception because the Object ID
contains zeros.
The code looks like:
for( int i = 0; i < len; i++ )
if( (char) (s[i] = id[i]) == '\0' ) {
_CORBA_String_helper::free(s);
OMNIORB_THROW(BAD_PARAM,BAD_PARAM_InvalidObjectId,
CORBA::COMPLETED_NO);
}
If I don't misunderstood something could somebody suggest me how to fix
the issue.
Cheers,
Sergei
More information about the omniORB-list
mailing list