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

replace "rclcpp::ok()" by atomic-flag to avoid UAF bug #693

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from

Conversation

GoesM
Copy link

@GoesM GoesM commented Apr 27, 2024


Basic Info

Info Please fill out this column
Ticket(s) this addresses #691
Primary OS tested on Ubuntu22.04
Robotic platform tested on gazebo simulation of Tally

Description of contribution in a few bullet points

  • add an atomic-flag for threads

Description of documentation updates required from your changes

  • avoid UAF bug caused by rclcpp::ok() 's wrong work

Future work that may be required in bullet points

Signed-off-by: goes <GoesM@buaa.edu.cn>
Copy link
Owner

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@@ -240,6 +241,8 @@ SlamToolbox::on_shutdown(const rclcpp_lifecycle::State & state)
SlamToolbox::~SlamToolbox()
/*****************************************************************************/
{
stop_threads_.store(true);
Copy link
Owner

Choose a reason for hiding this comment

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

Needs to be in the on_deactivate function as well

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.

None yet

2 participants