Skip to content

Add error diagnostic for semantic with parameters (#6487)#7126

Closed
tcorringham wants to merge 2 commits into
microsoft:mainfrom
tcorringham:issue-6487
Closed

Add error diagnostic for semantic with parameters (#6487)#7126
tcorringham wants to merge 2 commits into
microsoft:mainfrom
tcorringham:issue-6487

Conversation

@tcorringham

Copy link
Copy Markdown
Collaborator

A non-null parenthesized list following a semantic was mis-parsed as a direct initializer. When the semantic actions for a direct initializer are performed the type of the initializer is dereferenced - however as a semantic doesn't have a type this resulted in a NULLPTR being dereferenced which caused a crash.

As semantics don't accept parameters any parenthesized list following a semantic is an error. We now generate an error diagnostic if a l-paren follows a semantic.

Fixes #6487

A non-null parenthesized list following a semantic was mis-parsed as a
direct initializer. When the semantic actions for a direct initializer
are performed the type of the initializer is dereferenced - however as
a semantic doesn't have a type this resulted in a NULLPTR being
dereferenced which caused a crash.

As semantics don't accept parameters any parenthesized list following
a semantic is an error. We now generate an error diagnostic if a
l-paren follows a semantic.
@tcorringham tcorringham requested a review from a team as a code owner February 6, 2025 12:33
@github-actions

github-actions Bot commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

✅ With the latest revision this PR passed the C/C++ code formatter.

Fix formatting.
@tcorringham

Copy link
Copy Markdown
Collaborator Author

This issue has been fixed by the alternative PR #7729, so I am closing this PR.

@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Dec 12, 2025
@tcorringham tcorringham deleted the issue-6487 branch January 26, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

DXC crashes on bad shader register input

1 participant