[PR #14345] [MERGED] Initialize all members of Terminal #30058

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14345
Author: @lhecker
Created: 11/5/2022
Status: ✅ Merged
Merged: 11/7/2022
Merged by: @undefined

Base: main ← Head: dev/lhecker/14129-fix-uninitialized-members


📝 Commits (1)

  • 13144f6 Initialize all members of Terminal

📊 Changes

2 files changed (+22 additions, -43 deletions)

View changed files

📝 src/cascadia/TerminalCore/Terminal.cpp (+1 -18)
📝 src/cascadia/TerminalCore/Terminal.hpp (+21 -25)

📄 Description

The following members were not initialized during construction:

  • CursorType _defaultCursorShape
  • bool _suppressApplicationTitle
  • bool _bracketedPasteMode
  • size_t _hyperlinkPatternId
  • SelectionExpansion _multiClickSelectionMode
  • til::CoordType _scrollbackLines

Unlike gcc and clang, MSVC is fairly tame when it comes to removing code
tainted by undefined behavior, so the most likely affect this had is that
we were reading uninitialized memory.

Related to #14129.


🔄 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/14345 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 11/5/2022 **Status:** ✅ Merged **Merged:** 11/7/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/14129-fix-uninitialized-members` --- ### 📝 Commits (1) - [`13144f6`](https://github.com/microsoft/terminal/commit/13144f67a1a2614f83472e1f2f64c2fb9fb37da5) Initialize all members of Terminal ### 📊 Changes **2 files changed** (+22 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+1 -18) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+21 -25) </details> ### 📄 Description The following members were not initialized during construction: * `CursorType _defaultCursorShape` * `bool _suppressApplicationTitle` * `bool _bracketedPasteMode` * `size_t _hyperlinkPatternId` * `SelectionExpansion _multiClickSelectionMode` * `til::CoordType _scrollbackLines` Unlike gcc and clang, MSVC is fairly tame when it comes to removing code tainted by undefined behavior, so the most likely affect this had is that we were reading uninitialized memory. Related to #14129. --- <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:38:24 +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#30058