microsoft / microsoft/DirectXShaderCompiler

DXC crash when compiling hull shader

Open
#7,173 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug crash
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

Description
DXC crashes internally (segmentation fault) when compiling a hull shader with a specific pattern. There must be a matrix array loaded from a structured buffer inside the shader and there must be a static const matrix array declared at global scope. I couldn't reproduce this is a vertex or pixel shader.

Steps to Reproduce
Try to compile the following shader: https://godbolt.org/z/h4YbbP6hv
Note it produces a segfault.

Actual Behavior
Program terminated with signal: SIGSEGV
Compiler returned: 139

Environment

  • DXC version: 1.8.2407 (but reproduced on multiple versions including trunk)
  • Host Operating System: Windows 11 24H2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shader reproducer linked on Godbolt and confirm the SIGSEGV with the stated DXC versions, including trunk. Trace the failure through the hull-shader compilation path; done means the reproducer no longer crashes and a regression test covers this shader pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.