Binary data can trigger a cpptools infinite loop
@sean-mcmanus is already working on this.
Since Sep 1, 2026.
Assessment
This issue has not been assessed yet.
Description
Environment
- OS and Version: MacOS 26, using a container running Ubuntu 24.04.4 LTS
- VS Code Version: 1.135.0 (Universal)
- C/C++ Extension Version: 0.6.18
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
I have a file that, when placed in a directory within a workspace that uses cpptools, causes cpptools-srv2 to get stuck in an apparent infinite loop. I've redacted the file so that it's mostly NULs. In fact, strings things it has no text at all.
Steps to reproduce:
- Make sure that the C++ extension is installed.
- Extract the attached file. Name it
testfile(or probably just about anything else). - Check your CPU usage.
I believe this is not a security issue with any meaningful impact, as (as far as I know) it's only triggerable by placing the offending content into a non-restricted-mode workspace, and it's straightforward to get actual code execution in this context using ordinary configuration. It is, however, a kind of annoying functionality bug, since I have repeatedly triggered it by accident.
FWIW, there is very little content in that file. I managed to reduce it to a file that's kind of large but has almost as little complexity as one could imagine. I did not try to reduce it to a smaller file.
Configuration and Logs
There is no relevant configuration. The log says:
LSP: (received) cpptools/fileCreated: file:///workspaces/master/testfile
LSP: (invoked) cpptools/fileCreated: file:///workspaces/master/testfile
Initiating store rescan...
Other Extensions
No response
Additional context
No response
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-cpptools
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Openbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 assignee ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
microsoft/vscode-cpptools#14769 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-cpptools#14768 · 1 comment ·
All issues in microsoft/vscode-cpptools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·