[PR #9893] [MERGED] Work around a compiler bug w/ coroutines and exceptions #27799

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9893
Author: @DHowett
Created: 4/19/2021
Status: Merged
Merged: 4/19/2021
Merged by: @undefined

Base: mainHead: dev/duhowett/well_might_as_well_not_explode_if_we_can


📝 Commits (1)

  • 561d62c Work around a compiler bug w/ coroutines and exceptions

📊 Changes

1 file changed (+21 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+21 -1)

📄 Description

There is a bug in the compiler that we trip over when we handle the
exception generated by Package::Current inside a coroutine. It appears
to destruct an invalid instance of winrt::factory_guard_count.

Learned from the compiler folks: "coroutine frame pointer wasn't being
stored ... properly".

Fixes #9821


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9893 **Author:** [@DHowett](https://github.com/DHowett) **Created:** 4/19/2021 **Status:** ✅ Merged **Merged:** 4/19/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/duhowett/well_might_as_well_not_explode_if_we_can` --- ### 📝 Commits (1) - [`561d62c`](https://github.com/microsoft/terminal/commit/561d62cbd0d83b702855c139580af35d184749b3) Work around a compiler bug w/ coroutines and exceptions ### 📊 Changes **1 file changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+21 -1) </details> ### 📄 Description There is a bug in the compiler that we trip over when we handle the exception generated by Package::Current inside a coroutine. It appears to destruct an invalid instance of winrt::factory_guard_count. Learned from the compiler folks: "coroutine frame pointer wasn't being stored ... properly". Fixes #9821 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:18 +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#27799