[omniORB] Potential bug in omniORB 4.1

Peter S. Housel housel at acm.org
Wed Mar 7 00:36:53 GMT 2007


I'm trying to get omniifr working with omniORB 4.1.  (It worked fine
with omnORB 4.0.7.) With the IR running, using "omniidl -bifr" to compie
the IDL code located at:

http://corba-omniorb.cvs.sourceforge.net/*checkout*/corba-omniorb/corba-omniorb/Account.idl?revision=1.1.1.1

ends up causing a marshalling exception.

I traced the problem to the following code in
src/lib/omniORB/dynamic/typecode.cc:

    case CORBA::tk_enum:
      {
	// check that <label> is of the correct type
	if( !dtc->equivalent(lbl_tc) )
	  OMNIORB_THROW(BAD_PARAM,
			BAD_PARAM_IncompatibleDiscriminatorType,
			CORBA::COMPLETED_NO);
	CORBA::ULong c;
	label >>= c;
	lbl_value = c;
	break;
      }

The discriminator type is tk_enum, and label has a tk_enum typecode too,
but the code here is trying to extract the label into a CORBA::ULong.
Due to the type mismatch, the extract into c fails.

Is this a bug in omniORB 4.1, or in the way omniifr is using
CORBA::create_union_tc()?

-- 
Peter S. Housel <housel at acm.org>



More information about the omniORB-list mailing list