CORBA 2.4 NO IDEA Avatar
  1. OMG Issue

CORBA24 — Problem with valuetype parameter copying

  • Key: CORBA24-77
  • Legacy Issue Number: 3364
  • Status: closed  
  • Source: Floorboard Software ( Jonathan Biggar)
  • Summary:

    Corba 2.3.1 section states that valuetypes passed as parameters
    are copied when passed into the receiving context. Is this also true
    for valuetypes that are embedded in a contructed IDL type passed as a


    // IDL

    valuetype V { };

    struct S

    { V a_v; }


    interface I

    { S op(in S s1, inout S s2, out S s3); }


    When I::op is called are the valuetypes embedded in s1, s2, s3 and the
    return value supposed to be copied when making a collocated call?

    Example 2:

    // IDL

    interface J

    { any op(in any a1, inout any a2, out any a3); }


    If one of the any parameters to J::op contains a valuetype, must it be
    copied before/after a collocated call? What if the any contains a
    struct S instead?

    It seems to me we need to revisit the valuetype copying issue. We have
    three choices:

    1. Valuetypes are not copied for collocated calls.
    2. Only valuetypes as explicit parameters are copied for collocated
    3. All valuetypes are copied no matter how deeply they are nested in

    Currently the specification is ambiguous as to whether the semantics are
    supposed to be case 2 or 3. Case 3 is the only one that provides
    guaranteed location transparency, but the cost to implement case 3 for
    collocated calls far too high. It would effectively require the same
    overhead as marshalling/unmarshalling for any operation that has a
    valuetype embedded in a complex IDL type or any.

    So, given that transparency for collocated calls cannot be maintained
    without high overhead, should we completely remove the copying
    requirement because transparency cannot be maintained, or should we just
    document that case 2 is the accepted semantic?

  • Reported: CORBA 2.3.1 — Fri, 25 Feb 2000 05:00 GMT
  • Disposition: Resolved — CORBA 2.4
  • Disposition Summary:

    resolved, see below

  • Updated: Fri, 6 Mar 2015 20:58 GMT