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

[SPIR-V] Unhandled Exception "Name is not a simple identifier" and others, but only when running in debugger #6973

Closed
devshgraphicsprogramming opened this issue Oct 17, 2024 · 3 comments · Fixed by #7012
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V
Milestone

Comments

@devshgraphicsprogramming

Description

I was making a shader with the EXE/godbolt of the compiler, but now when I compile at runtime I get unhandled exception after unhandled exception

Steps to Reproduce

This godbolt: https://godbolt.org/z/WMsK7sP3d

Actual Behavior

Can't run with the debugger attached

Environment

  • DXC version: trunk as of 17/10/24
  • Host Operating System Godbolt
@devshgraphicsprogramming devshgraphicsprogramming added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Oct 17, 2024
@damyanp damyanp moved this to For Google in HLSL Triage Oct 17, 2024
@devshgraphicsprogramming
Copy link
Author

Made a 50% smaller repro https://godbolt.org/z/qojxv4c5M

@devshgraphicsprogramming
Copy link
Author

devshgraphicsprogramming commented Oct 18, 2024

The whole bug seems to be caused by me defining void WhittedTask::operator()() outside the struct

Might also affect DXIL/non-spirv output

devshgraphicsprogramming pushed a commit to Devsh-Graphics-Programming/Nabla-Examples-and-Tests that referenced this issue Oct 18, 2024
@s-perron
Copy link
Collaborator

I'm able to reproduce when using a debug build of the compiler. I reduced the test to:

struct WhittedTask
{
    void operator()();
};

void WhittedTask::operator()()
{
}

[numthreads(8,8,1)]
void main(uint32_t3 gl_GlobalInvocationID : SV_DispatchThreadID)
{
}

s-perron added a commit to s-perron/DirectXShaderCompiler that referenced this issue Nov 18, 2024
We hit an assert when trying to get the name of `operator()`. This is
fixed by first checking if it function declatarion is an identifier.

Fixes microsoft#6973
@s-perron s-perron added this to the Next Release milestone Nov 18, 2024
@s-perron s-perron moved this from For Google to Triaged in HLSL Triage Nov 18, 2024
s-perron added a commit that referenced this issue Nov 20, 2024
We hit an assert when trying to get the name of `operator()`. This is
fixed by first checking if it function declatarion is an identifier.

Fixes #6973
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants