Skip to content

[rosidl_typesupport_introspection_c] get item function for arrays is semantically broken #522

@ivanpauno

Description

@ivanpauno

See ros2/rmw_cyclonedds#228 (comment).


Why wasn't this found before?
I think it deserves some explanation, as the function has been broken for years.

The "reference implementations" (cyclone and fastrtps dynamic) of the introspection typesupport were relying on conceptually broken cpp and were also leaking.
Instead of that, they should have been using the resize and get functions provided by the introspection typesupport.
They weren't using those functions at all and those functions don't have any test, thus the error wasn't found before.

When a fix was applied in ros2/rmw_cyclonedds#228, it was found that the semantics of the "get_function" for arrays in the C introspection typesupport is different to the semantics of similar functions in the CPP introspection typesupport and also different to similar functions for bounded/unbounded sequences in the C typesupport.

See also:

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions