microsoft / microsoft/DirectXShaderCompiler
[Frontend] DXC crashed with asuint()
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
LLVM assertion failed.
Steps to Reproduce
dxc -T cs_6_0 -spirv path/to/file.hlsl
HLSL code:
RWSturcturedBuffer<uint> Out;
[numthreads(1, 1, 1)]
void main()
{
Out[0] = asuint(-1);
}
If we change the code as follows, the issue is not occurred.
Out[0] = asuint(-1 * 1);
Actual Behavior
Assertion failed: (SI.isSigned() == E->getType()->isSignedIntegerOrEnumerationType() && "Invalid evaluation result."), function Success, file ExprConstant.cpp, line 6199.
Environment
- DXC version: libdxcompiler.dylib: 1.8(dev;4640-45018c75)
- Host Operating System: Windows 11 23H2 and macOS 14.5
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 reproducing the crash with dxc -T cs_6_0 -spirv and the HLSL snippet in the issue. Inspect the constant-evaluation assertion at ExprConstant.cpp line 6199 and compare it with the non-crashing asuint(-1 * 1) case; done means the original command completes without the assertion.
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
- Clearly specified
- Newbie friendliness
- 35/100