microsoft / microsoft/DirectXShaderCompiler

[SPIR-V] SIGSEGV when copying template types from constant buffers into local variables

Open
#7,288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description
Compiler crashes when attempting to copy a templated type from ConstantBuffer<>, into a local variable of the same type. This only happens in SPIR-V mode. A similar code works when copying field by field.

Steps to Reproduce
https://godbolt.org/z/1o1Tee8v9
Working version (copying field-by-field): https://godbolt.org/z/P3ojzxxTW

Actual Behavior
Internal Compiler Crash, with SIGSEGV

Environment

  • DXC version: DXC (trunk) on godbolt
  • Host Operating System: Godbolt/Linux

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

Run the linked Godbolt reproducer with DXC trunk in SPIR-V mode and compare it with the field-by-field version. Investigate the compiler path handling the templated type copy from ConstantBuffer<> into a local variable; done means the reproducer no longer produces an internal SIGSEGV.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.