Skip to content

[SPIR-V] Crash when using local struct with ByteAddressBuffer/StructuredBuffer memeber and -fspv-debug=vulkan-with-source #7264

Open

Description

@webez

Description
DXC returns SIGSEGV when using a local variable in a function with struct type that has a ByteAddressBuffer/StructuredBuffer member

Steps to Reproduce
https://godbolt.org/z/Yj8635bEr

If a function that uses the struct is added instead of crashing, invalid spirv is generated
https://godbolt.org/z/Psbfqndo5

Actual Behavior
SIGSEV or
fatal error: generated SPIR-V is invalid: In Logical addressing, variables may not allocate a pointer type
%68 = OpVariable %_ptr_Function__ptr_Uniform_type_ByteAddressBuffer Function

Environment
DXC Trunk

Activity

  1. added
    bug
    needs-triage
    spirv
    on Mar 26, 2025
  2. s-perron commented on Dec 12, 2025

    @s-perron
    Collaborator

    Steve Urquhart (@SteveUrquhart) This has been around a while. Are you familiar with it?

  3. SteveUrquhart commented on Dec 18, 2025

    @SteveUrquhart
    Contributor

    Steven Perron (@s-perron), I haven't seen this, but you can assign it to me. I no longer see the second godbolt failing as it did on 1.8.2505. Although when it did, it seems to intersect with #8009.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugspirv

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions