Report 2235 Actions
Problem Report Number |
2235 |
Submitter's Classification |
Specification problem |
State |
Resolved |
Resolution |
Permanent Interpretation (PIN) |
Problem Resolution ID |
PIN.X.0253 |
Raised |
1970-01-01 08:00 |
Updated |
2003-03-13 08:00 |
Published |
1999-03-26 08:00 |
Product Standard |
CORBA |
Certification Program |
The Open Brand certification program |
Test Suite |
VSORB version 1.1.0 |
Test Identification |
iiop/all 0 |
Specification |
CORBA 2.1 |
Location in Spec |
See Problem Text |
Problem Summary |
PIN4O.00001 The issue is: Under the C mapping how do you allocate storage for a basic type you wish to place in an any. Consider inserting a long into an Any. Do you do this: solution 1 any->_type = TC_long; any-... |
Problem Text |
The issue is: Under the C mapping how do you allocate storage for a basic type you wish to place in an any. Consider inserting a long into an Any. Do you do this: solution 1 any->_type = TC_long; any->_value = CORBA_alloc(sizeof(CORBA_long)); or this: solution 2 any->_type = TC_long; any->_value = CORBA_long__alloc(); One vendor argues that the text below supports solution 2. However as a long is not a constructed type solution 1 seems more natural. >From "17.8 Mapping Considerations for Constructed Types" of CORBA 2.1 specification: "For types whose parameter passing modes require heap allocation, an ORB implementation will provide allocation functions. These types include variable-length struct, variable-length union, sequence, any, string, wstring and array of a variable-length type. The return value of these allocation functions must be freed using CORBA_free(). For one of these listed types T, the ORB implementation will provide the following type-specific allocation function: T *T__alloc(); /* C */"
|
Test Output |
not available
|
Review Information
Review Type |
TSMA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Recommendation |
No Resolution Given |
Review Response |
We recommend this request be sent to OMG for a binding interpretation of the govering specification. A PIN needs to be granted if the second approach described above is correct. This request should be refused if the first approach is correct.
|
Review Type |
SA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
No Resolution Given |
Review Conclusion |
An interpretation is requested from OMG.
|
Review Type |
Expert Group Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
No Resolution Given |
Review Conclusion |
OMG has selected solution 2. Additional information: In a future CORBA version the the text in section 19.8 of CORBA 2.2 (section 17.8 of CORBA 2.1) will be changed to better illustrate the existing words. The following existing paragraph seems to cover the question, if the type for an any is being allocated to the heap. For types whose parameter passing modes require heap allocation,an ORB implementation will provide allocation functions. These types include variable-length struct, variable-length union, sequence, any, string, wstring and array of a variable-length type. The return value of these allocation functions must be freed using CORBA_free(). For one of these listed types T, the ORB implementation will provide the following type-specific allocation function: T *T__alloc(); /* C */" To clarify the paragraph for type any value we will add the following text. To initialize the fields of an any with type T where T is a CORBA basic type, a T_alloc() operation shall be utilized. For example, an any containing a CORBA_long that was allocated to the heap would be initialized by: any->type = TC_long any_>value = CORBA_long__alloc( ); If the CORBA basic type value for the any was not allocated from the heap then the type specific allocator would not be used.
|
Review Type |
SA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
Permanent Interpretation (PIN) |
Review Conclusion |
A Permanent Interpretation is granted.
|
Problem Reporting System Options:
|