microsoft / microsoft/DirectXShaderCompiler
[SPIR-V] SIGSEGV when copying template types from constant buffers into local variables
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
Compiler crashes when attempting to copy a templated type from ConstantBuffer<>, into a local variable of the same type. This only happens in SPIR-V mode. A similar code works when copying field by field.
Steps to Reproduce
https://godbolt.org/z/1o1Tee8v9
Working version (copying field-by-field): https://godbolt.org/z/P3ojzxxTW
Actual Behavior
Internal Compiler Crash, with SIGSEGV
Environment
- DXC version: DXC (trunk) on godbolt
- Host Operating System: Godbolt/Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the linked Godbolt reproducer with DXC trunk in SPIR-V mode and compare it with the field-by-field version. Investigate the compiler path handling the templated type copy from ConstantBuffer<> into a local variable; done means the reproducer no longer produces an internal SIGSEGV.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100