microsoft / microsoft/DirectXShaderCompiler
Crash in syntax check when using 'matrix' keyword in an operation
Open
Nobody has claimed this yet.
bug
crash
incorrect-code
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
While working on a project that supports both GLSL and HLSL, i inadvertently wrote a meaningless code
and instead of getting a syntax error the compiler simply crashed
Steps to Reproduce
try to compile something like this:
float2x2 matrix;
RWBuffer<float> Output;
main()
{
Output[0] = float2(1,2) * matrix;
}
$ ./bin/x64/dxc.exe -T cs_6_0 hello.hlsl
Internal compiler error: access violation. Attempted to read from address 0x0000000000000038
Segmentation fault
Actual Behavior
Internal compiler error: access violation. Attempted to read from address 0x0000000000000038
Segmentation fault
Environment
- DXC version
dxcompiler.dll: 1.7 - 1.7.2308.7 (69e54e290); dxil.dll: 1.7(101.7.2308.12)) - Host Operating System Windows 11
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
Start by compiling the provided HLSL reproducer with the documented dxc command and observe the access violation. Trace the compiler path reached by the matrix operation; done means the same input reports a syntax error instead of crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100