Skip to content

SIGSEGV when storing struct with buffer that was picked specifically from array of buffers #7386

Open
@noahwhygodwhy

Description

@noahwhygodwhy

Preamble

I acknowledge that storing a buffer binding into a buffer is ridiculous and not in spec. However, it should probably give an error, not sigsegv.

Description

Encountered a SIGSEGV running dxc on a shader when trying to find if there's any existing bugs in having structs contain buffers when compiled to spir-v. (this issue is a different error than the one I was looking for, this one happens when outputting dxil)

Steps to Reproduce

https://godbolt.org/z/8jhTebWY5

When the buffer buff3 is put into the struct and then stored, the compiler outputs a seemingly correct error.

However when a selection from the buff2 buffer array is put into the struct, and then stored, it crashes.

Behavior is identical for buff2[] and buff3 when outputting spirv. It only crashes for dxil.

Actual Behavior

SIGSEGV code 139

Environment

  • DXC version: 1.8.2403.2, 1.8.2502, and trunk
  • Host Operating System: godbolt + windows 11 22H2 - 22621.5189

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triage

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions