Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugzilla 3942] Sequence elements don't work correctly with var types #2037

Open
mitza-oci opened this issue Jan 25, 2023 · 0 comments
Open
Labels

Comments

@mitza-oci
Copy link
Member

Migrating this from Vanderbilt's Bugzilla http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3942

The bottom line is that sequences of object references don't work the way the spec requires.

Here are the key parts of IDL-to-C++ formal/12-07-02.

In sequences (5.15):

For strings, wide strings, and object references, operator[] for a sequence must return a type with the same semantics
as the types used for string, wide string, and object reference members of structs...

In structs (5.12):

Assignment between a string, wide string, or object reference member and a corresponding T_var type (String_var,
WString_var, or A_var) always results in copying the data, while assignment with a pointer does not.

This is a bit confusing because of the "copy the data" phrase and trying to describe strings and object references in one clause, but it effectively means that the reference count is increased for member-to-var assignment so that when the var goes out of scope the count is back to where it was before the assignment.

There is a test in TAO/tests/Bug_3942_Regression which has !FIXED_BUGS_ONLY in the test list.

@mitza-oci mitza-oci added the bug label Jan 25, 2023
iguessthislldo added a commit to iguessthislldo/OpenDDS that referenced this issue Jan 25, 2023
OpenDDS#3994

- Fixed missing `TAO_VERSION_CODE` on TAO 2.2 by using
  `TAO_MAJOR_VERSION` instead.
- Replaced reference to bugzilla ticket with
  DOCGroup/ACE_TAO#2037
- Cleaned up and added sorting option for `update_gitignore.pl` used in
  OpenDDS#3994
- Replaced sprintf usage to satisfy build_m12_i0_j_FM-1f GHA warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant