microsoft / microsoft/DirectXShaderCompiler
Internal compiler error when attempting to link a non-library input
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
DXC page faults if you attempt to feed a cs_6_3 input to the linker.
Steps to Reproduce
Create this file and name it test.hlsl:
Texture2D<uint> texResource : register(t900);
RWTexture2D<uint> rwTexResource[] : register(u0, space2400);
[numthreads(8, 8, 1)]
void main(uint3 dtid : SV_DispatchThreadID, uint3 gtid : SV_GroupThreadID, uint3 gid : SV_GroupID, uint gindex : SV_GroupIndex)
{
rwTexResource[0][dtid.xy] = texResource.Load(dtid.xyz);
}
Run these commands:
dxc.exe -T cs_6_3 -Fo test.bin test.hlsl
dxc.exe -link -T cs_6_3 -Fo test2.bin test.bin
Actual Behavior
DXC will crash with this error:
Internal compiler error: access violation. Attempted to read from address 0x0000000000000000
Environment
- DXC version dxcompiler.dll: 1.7 - 1.7.2207.3 (e9137cd1d); dxil.dll: 1.7(101.7.2207.10)
- Host Operating System Windows 10
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 test.hlsl using the two dxc.exe commands in the issue, especially the -link invocation on test.bin. Trace the linker path for a non-library cs_6_3 input and verify that it reports a handled error instead of an access violation.
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