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 a segfault when re-using wait set #282

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Fix a segfault when re-using wait set #282

merged 1 commit into from
Oct 11, 2022

Conversation

nnmm
Copy link
Contributor

@nnmm nnmm commented Oct 11, 2022

rcl_wait() modifies the entries in rcl_wait_set.subscriptions so that some of them will be null pointers, causing a segfault if called a second time.

As a short term-fix, this makes it so that the wait set can only be used once.

The wait set should be made reusable as part of #278

esteve
esteve previously approved these changes Oct 11, 2022
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.

@nnmm Good catch!

@nnmm
Copy link
Contributor Author

nnmm commented Oct 11, 2022

@esteve thanks, writing my own application on top of rclrs has been really helpful for finding bugs and usability issues like #276. Could you reapprove (after force-push for clippy)?

@esteve
Copy link
Collaborator

esteve commented Oct 11, 2022

@nnmm yeah, I agree, using an application to drive features is an excellent way of finding out what's missing and what can be improved

@nnmm nnmm merged commit 0c26297 into main Oct 11, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix_waitset_segfault branch October 11, 2022 11:05
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