microsoft / microsoft/DirectXShaderCompiler

unsigned int{16,32,64}_t at global scope causes Segfault (attempted to read from 0x8)

Open
#4,648 4 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

unsigned int16_t g;

result

Internal compiler error: access violation. Attempted to read from address 0x0000000000000008

Qualifiers (static, extern...) don't change the observable behavior.
Fun fact: use a matrix/vector expansion (uint16_t1x1) and it doesn't crash anymore

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

The issue provides only a minimal HLSL reproducer, with no source files, tests, or entry points named. Start by compiling the global unsigned int16_t g; case and comparing it with the uint16_t1x1 variant, then trace the compiler path for global declarations and add a regression test once the crash location is identified. Done means the reproducer compiles without an access violation and the test covers the reported qualifiers.

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.