Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tcorringham
Copy link
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
Copy link
Contributor

github-actions bot commented Feb 6, 2025

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

Fix formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

DXC crashes on bad shader register input
1 participant