microsoft / microsoft/DirectXShaderCompiler
Crash in TranslatePtrIfUsedByLoweredFn
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Repro:
Compile the following, (I used as_6_5, /Zi -enable-16bit-types /Qembed_debug )
Texture2D<float4> g_texture;
struct smallPayload
{
Texture2D<float4> texture;
};
[numthreads(1, 1, 1)]
void main()
{
smallPayload p;
p.texture = g_texture;
DispatchMesh(1, 1, 1, p);
}
The compilation should fail because of passing an object to DispatchMesh, but instead, there's an assertion failure and then crash in TranslatePtrIfUsedByLoweredFn
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 as_6_5, /Zi, -enable-16bit-types, and /Qembed_debug, then inspect TranslatePtrIfUsedByLoweredFn where the assertion and crash occur. Done means the invalid object passed to DispatchMesh produces a compilation error rather than an assertion failure or crash.
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