RP/TUX 8.1/TUX 9.0 - The corba application server will core dump when use valuetype as out parameter. (Doc ID 776588.1)

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle Tuxedo / Tuxedo / 8.1,9.0
Information in this document applies to any platform

Goal

DESCRIPTION:

If using value type as out parameter, the corba application server will core dump. 

Reference:

  The following is a simple summary of test case, 

  The idl file is like this:

  module VSimple
  {
    ... ...
    valuetype SimpleStructValue
    {
       ... ...
    }
    ... ...
    interface ISimple
    {
        ... ...
        void op3( out  SimpleStructValue  simple_struct_value );
        ... ...
    }   
    ... ...
  }

  We use this idl file to generate the files we needed.  The op3()'s implementation is the following:

      1285 void VSimple::ISimple::op3 (
      1286     ::VSimple::SimpleStructValue *& simple_struct_value)
      1287 
      1288 {        
      1289   ::CORBA::ULong    _argcount = 1;
      1290   OBBArgument                 _args[1];
      1291   OBBArgument                 *_arg_ptr= _args;
      1292   ::CORBA::Request_var          _request;
      1293   ::CORBA::ValueBase * _arg_1_base_ptr;
      1294  /*..............................................................*/
      1295         
      1296         
      1297  _arg_ptr->TC=::VSimple::_tc_SimpleStructValue;
      1298  _arg_ptr->ValuePtr=(void *) &_arg_1_base_ptr;
      1299  _arg_ptr->Name=(char *)"simple_struct_value";
      1300  _arg_ptr->Flags=CORBA::ARG_OUT;
      1301  _arg_ptr++;
      1302            
      1303            
      1304  // Create request.
      1305  _request = OBB::OBB__create_request (
      1306     this,           // object
      1307     4,             // operation name length 
      1308     "op3", // operation name 
      1309     _argcount,      // argument count
      1310     _args,      // argument list 
      1311     1,      // response expected 
      1312     0,      // context object
      1313     0);         // context list
      1314 
      1315  // Invoke method.
      1316 
      1317  _request->OBB__invoke ();
      1318 
      1319  simple_struct_value = ::VSimple::SimpleStructValue::_downcast(_arg_1_base_ptr);
      1320  return;
      1321 
      1322 }

  

  When the client call op3(), the corba server will core dump at the following lines:
  ... ....

  ::VSimple::SimpleStructValue_var arg1 = ::VSimple::SimpleStructValue::_downcast (*((::CORBA::ValueBase**)
(arginfo[1].ValuePtr)));
  arg1->_add_ref();  <---- core dump here 

  ... ...
  
  The arg1 always be null pointer here.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms