microsoft / microsoft/terminal

AppHost::_WindowActivated reads/writes various fields in a thread unsafe manner - maybe extra bad for ARM

Open
#13,599 0 comments 0 reactions 0 assignees View on GitHub
Area-Remoting Area-Windowing Issue-Bug Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Additionally, that function might be called through the destructor when XAML empties the remaining Win32 message queue and we get called through `IslandWindow::MessageHandler`. `_window` is set to `nullptr` before that happens and we should check it before it's used through `_CurrentDesktopGuid`.

Contributor guide

Open the contributing guide

Research direction

Start at AppHost::_WindowActivated and trace the destructor path through IslandWindow::MessageHandler. Inspect the thread-unsafe field accesses, especially _window and _CurrentDesktopGuid; done means the accesses are safe and the null _window case cannot be dereferenced.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.