Binary data can trigger a cpptools infinite loop

Đang mở
#14,723 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sean-mcmanus đang làm issue này rồi.

Từ ngày 1/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug Language Service more info needed
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:

  1. Make sure that the C++ extension is installed.
  2. Extract the attached file. Name it testfile (or probably just about anything else).
  3. 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.

testfile.gz

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

Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
14 giờ 46 phút
Pull request đã merge (30 ngày)
61

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.