A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/microsoft/DirectXShaderCompiler/issues/7510 below:

Segfault when calling `sizeof()` on templated type · Issue #7510 · microsoft/DirectXShaderCompiler · GitHub

Description

We just upgraded to the latest May 2025 release, from a previous self-compiled build at 47e11af. One of our shaders triggers a SIGSEGV right inside DXC. This seems to be caused by calling sizeof() on a templated type, regardless of what the struct contains. It doesn't seem to need to use T in any capacity for this to trigger.

Steps to Reproduce

https://godbolt.org/z/hnfd5EEGY (DXC on trunk, this doesn't have an explicit tagged 1.8.2505 release just yet)

template<typename T> struct Encoded{
    // uint x;
    // T y;
};

[numthreads(8, 8, 1)]
void main(uint2 tid : SV_DispatchThreadID) {
    uint s = sizeof(Encoded<int>);
}

It doesn't matter if we compile to DXIL or SPIR-V.

Environment

Given that we have a known-working commit, bisection should only contain these 51 commits:

47e11af...v1.8.2505


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4