[Linux] Fix GetSkippedRanges crash for virtual unsaved files - #8993
Open
Keith Stockdale (KStocky) wants to merge 2 commits into
Open
Keith Stockdale (KStocky) wants to merge 2 commits into
Keith Stockdale (KStocky) wants to merge 2 commits into
Conversation
… virtual unsaved file.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Keith Stockdale (KStocky)
September 30, 2026 20:38
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new filesystem installation error must be handled before invoking Clang.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Fixes a Linux IntelliSense crash when querying skipped ranges for unused virtual files.
Changes:
- Installs a disk filesystem during
GetSkippedRanges. - Adds Linux regression coverage.
- Documents the fix.
| File | Description |
|---|---|
tools/clang/tools/libclang/dxcisenseimpl.cpp |
Sets up filesystem context for skipped-range queries. |
tools/clang/unittests/HLSL/DXIsenseTest.cpp |
Adds Linux regression coverage. |
docs/ReleaseNotes.md |
Adds the bug-fix release note. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Handle error code from AutoPerThreadSystem initialization Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Keith Stockdale (KStocky)
September 30, 2026 20:41
View session
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix a Linux crash in
IDxcTranslationUnit::GetSkippedRangeswhen it is called for a virtual unsaved file that was not used while parsing the translation unit.This is caused by not having a valid
::llvm::sys::fs::MSFileSystemlive when calling certain functions that rely on one existing prior to them being called such asllvm::sys::fs::status. There are a couple of other sites that could produce a similar crash such as:DxcTranslationUnit::GetLocationDxcTranslationUnit::GetLocationForOffsetDxcCursor::FindReferencesInFileHowever, I have not reproduced crashes with these functions. So I have just left this PR focussed on
IDxcTranslationUnit::GetSkippedRanges