[omniORB] MARSHAL from pyMarshal.cc

Marco Ferreira mferreira at devion.org
Mon May 19 15:04:12 BST 2008


About the same file:

    static PyObject*
    unmarshalPyObjectEnum(cdrStream& stream, PyObject* d_o)
    { // repoId, name, item list

      char * string_ = PyString_AsString(PyObject_Repr(d_o));
      printf("%s\n", string_);

      PyObject* t_o = PyTuple_GET_ITEM(d_o, 3);

      OMNIORB_ASSERT(PyTuple_Check(t_o));

      CORBA::ULong e;
      e <<= stream;

      cout << e << "\n";

      if (e >= (CORBA::ULong)PyTuple_GET_SIZE(t_o))
        OMNIORB_THROW(MARSHAL, MARSHAL_InvalidEnumValue,
              (CORBA::CompletionStatus)stream.completion());

      PyObject* ev = PyTuple_GET_ITEM(t_o, e);
      Py_INCREF(ev);
      return ev;
    }

Result:

    (17, 'IDL:Incognito/SNMPVersion:1.0', 'SNMPVersion',
    (SNMP_V_UNKNOWN, SNMP_V1, SNMP_V2, SNMP_V3))
    3219025932
    omniORB: 2008-05-19 13:52:36.072857: throw MARSHAL from
    pyMarshal.cc:3033 (NO,MARSHAL_InvalidEnumValue)

Note the extremely high value of 'e' variable.


Marco Ferreira wrote:
> Sorry for all my mails, but this is really intriguing me.
> I've been hacking the following piece of code in pyMarshal.cc, to try to
> figure out what was happening at omniORB level:
>
>     static PyObject*
>     unmarshalPyObjectEnum(cdrStream& stream, PyObject* d_o)
>     { // repoId, name, item list
>
>       char * string_ = PyString_AsString(PyObject_Repr(d_o));
>       printf("%s\n", string_);
>
>       PyObject* t_o = PyTuple_GET_ITEM(d_o, 3);
>
>       OMNIORB_ASSERT(PyTuple_Check(t_o));
>
>       CORBA::ULong e;
>       e <<= stream;
>
>       printf("e=%ld\n", e);
>
>       if (e >= (CORBA::ULong)PyTuple_GET_SIZE(t_o))
>         OMNIORB_THROW(MARSHAL, MARSHAL_InvalidEnumValue,
>               (CORBA::CompletionStatus)stream.completion());
>
>       PyObject* ev = PyTuple_GET_ITEM(t_o, e);
>       Py_INCREF(ev);
>       return ev;
>     }
>
> And the output when the throwing occurs is:
>
>      (17, 'IDL:Incognito/SNMPVersion:1.0', 'SNMPVersion',
>     (SNMP_V_UNKNOWN, SNMP_V1, SNMP_V2, SNMP_V3))
>     e=-1075261268
>     omniORB: 2008-05-19 13:12:04.188990: throw MARSHAL from
>     pyMarshal.cc:3031 (NO,MARSHAL_InvalidEnumValue)
>
> My question would be: how is it possible that 'e' value is below 0 since
> it's declared as an unsigned long?
>
>
> Marco Ferreira wrote:
>   
>> That was what I suspected, but unfortunately pyMarshel.cc still throws
>> that MARSHAL.
>> I'm sure both sides (including my proxy) have the same version. Could
>> there be any other reason for this?
>>
>> Cheers
>>
>> Duncan Grisby wrote:
>>   
>>     
>>> On Thursday 15 May, Marco Ferreira wrote:
>>>
>>>   
>>>     
>>>       
>>>> Could any kind soul tell me if this a result of a bug at omniORB code by
>>>> any chance?
>>>>
>>>> omniORB: 2008-05-15 18:59:33.076226: throw MARSHAL from
>>>> pyMarshal.cc:3026 (NO,MARSHAL_InvalidEnumValue)
>>>>     
>>>>       
>>>>         
>>> This means that you have received an enum that claims to have a numeric
>>> value larger than the largest defined enum item. Almost certainly that's
>>> because the sender and receiver are using different versions of the IDL.
>>> Check that both sides of the communication have the same IDL.
>>>
>>> Cheers,
>>>
>>> Duncan.
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>   




More information about the omniORB-list mailing list