[PR #13410] Fix a race condition in CTerminalHandoff::s_StopListening #29532

Open
opened 2026-01-31 09:35:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/13410

State: closed
Merged: Yes


This commit fixes a minor race condition covered as part of #13368.
The member _pfnHandoff was read without the mutex _mtx being locked first.
The issue was solved by acquiring the lock early and running the entire
s_StopListening function with that lock held.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13410 **State:** closed **Merged:** Yes --- This commit fixes a minor race condition covered as part of #13368. The member `_pfnHandoff` was read without the mutex `_mtx` being locked first. The issue was solved by acquiring the lock early and running the entire `s_StopListening` function with that lock held.
claunia added the pull-request label 2026-01-31 09:35:28 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29532