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

Properly initialize the char array used in type hash calculations. #1182

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

clalancette
Copy link
Contributor

Previously, we were zero initializing it and only setting up one of its fields. But that doesn't totally properly initialize it; we really should call rcutils_char_array_init to make sure everything is initialized. Do that in the live source, as well as in the test for it.

This bug was exposed by ros2/rcutils#478 . @fujitatomoya @emersonknapp FYI

Previously, we were zero initializing it and only setting
up one of its fields.  But that doesn't totally properly
initialize it; we really should call rcutils_char_array_init
to make sure everything is initialized.  Do that in the
live source, as well as in the test for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor Author

Pulls: #1182
Gist: https://gist.githubusercontent.com/clalancette/60bd5624de4345702c1b549b82cd55a2/raw/0a152da4edb66f4ffc7c43379edeb83bf6e6bb5b/ros2.repos
BUILD args: --packages-above-and-dependencies rcl
TEST args: --packages-above rcl
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14568

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit bfe00f7 into rolling Sep 17, 2024
3 checks passed
@ahcorde ahcorde deleted the clalancette/fix-type-hash-init branch September 17, 2024 13:06
@ahcorde
Copy link
Contributor

ahcorde commented Sep 17, 2024

https://github.com/Mergifyio backport jazzy

@ahcorde
Copy link
Contributor

ahcorde commented Sep 17, 2024

should we backport this to humble or iron ?

Copy link

mergify bot commented Sep 17, 2024

backport jazzy

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 17, 2024
…1182)

Previously, we were zero initializing it and only setting
up one of its fields.  But that doesn't totally properly
initialize it; we really should call rcutils_char_array_init
to make sure everything is initialized.  Do that in the
live source, as well as in the test for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit bfe00f7)
@clalancette
Copy link
Contributor Author

should we backport this to humble or iron ?

Iron, yes. This code didn't exist in humble, so not needed there.

@clalancette
Copy link
Contributor Author

@Mergifyio backport iron

Copy link

mergify bot commented Sep 17, 2024

backport iron

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 17, 2024
…1182)

Previously, we were zero initializing it and only setting
up one of its fields.  But that doesn't totally properly
initialize it; we really should call rcutils_char_array_init
to make sure everything is initialized.  Do that in the
live source, as well as in the test for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit bfe00f7)
clalancette added a commit that referenced this pull request Sep 17, 2024
…1182) (#1183)

Previously, we were zero initializing it and only setting
up one of its fields.  But that doesn't totally properly
initialize it; we really should call rcutils_char_array_init
to make sure everything is initialized.  Do that in the
live source, as well as in the test for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit bfe00f7)

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
clalancette added a commit that referenced this pull request Sep 17, 2024
…1182) (#1184)

Previously, we were zero initializing it and only setting
up one of its fields.  But that doesn't totally properly
initialize it; we really should call rcutils_char_array_init
to make sure everything is initialized.  Do that in the
live source, as well as in the test for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit bfe00f7)

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants