Skip to content

Add defensive checks for declToIndex entries#8401

Open
tcorringham wants to merge 1 commit intomicrosoft:mainfrom
tcorringham:issue-5293
Open

Add defensive checks for declToIndex entries#8401
tcorringham wants to merge 1 commit intomicrosoft:mainfrom
tcorringham:issue-5293

Conversation

@tcorringham
Copy link
Copy Markdown
Collaborator

Check the variable is in the declToIndex map before calling reportUse() for that variable or marking it as Initialized.
HLSL out parameters or local variables from template instantiations may not be in the declToIndex map in the current DeclContext, which can lead to asserts when they are enabled, or the use of unitialized memory otherwise.

Fixes #5293
Fixes #8310

Check the variable is in the declToIndex map before calling reportUse() for
that variable or marking it as Initialized.
HLSL out parameters or local variables from template instantiations may not
be in the declToIndex map in the current DeclContext, which can lead to
asserts when they are enabled, or the use of unitialized memory otherwise.

Fixes microsoft#5293
Fixes microsoft#8310
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.

Internal Compiler Error Assert in template + out functions when it has local variables

1 participant