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

Fix panic on sequence_init() when size is 0 #407

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Oscarchoi
Copy link
Contributor

resolves: #406

In Rust 1.78, a panic occurs when publishing sequence-type messages containing array types, which could be fixed by adding null pointer handling.

Copy link
Collaborator

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change appears to add an appropriate guard to prevent a panic. I'm not seeing any immediate issues from the change, since the code looks like it otherwise can handle a null pointer, but a second reviewer would be appreciated.

@jhdcs jhdcs requested review from esteve and maspe36 June 21, 2024 12:16
Copy link
Collaborator

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oscarchoi LGTM, thanks!

@esteve esteve merged commit 7fd9a8b into ros2-rust:main Jun 21, 2024
3 checks passed
@Oscarchoi Oscarchoi deleted the bugfix/panic-on-sequence-init branch July 1, 2024 10:58
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.

Panic occurs when publish sequence types for Rust 1.78
3 participants