Skip to content

Conversation

@Rabie45
Copy link

@Rabie45 Rabie45 commented Aug 23, 2025

Purpose

Add a joined boolean field to the conn_t struct to accurately track
whether a thread has been properly joined. This prevents race conditions
and use-after-free bugs that could occur when threads were terminated
without proper synchronization.

The fix ensures that:

  • Thread joined state is explicitly tracked per connection
  • setup_thread() properly manages the joined flag
  • Thread termination follows proper synchronization protocols
  • Memory safety is maintained throughout thread lifecycle

This resolves the thread termination bugs described in issue #411
where improper thread state tracking could lead to crashes or
undefined behavior when connections were cleaned up.

@ismaell ismaell self-assigned this Sep 5, 2025
@ismaell ismaell added this to the v2.17.15 milestone Sep 5, 2025
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