Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault when parsing shader containing buffer-references #271

Closed
fabian-lunarg opened this issue Jul 3, 2024 · 0 comments · Fixed by #273
Closed

segmentation fault when parsing shader containing buffer-references #271

fabian-lunarg opened this issue Jul 3, 2024 · 0 comments · Fixed by #273
Assignees

Comments

@fabian-lunarg
Copy link
Contributor

fabian-lunarg commented Jul 3, 2024

using spirv-reflect from latest vulkan-sdk-1.3.283.0 (or HEAD), ubuntu 22.04, x86_64:

spirv-reflect g_buffer_vert.spv
[1]    171736 segmentation fault (core dumped)  spirv-reflect

I'm almost sure this a regression, but could not bisect when it got introduced.
the shader uses an array of buffer-references, which I believe is the trigger for the segfaults.
other shaders containing the same pattern also segfault.

layout(buffer_reference, scalar) readonly buffer VertexBufferPtr { packed_vertex_t v[]; };
layout(binding = BINDING_VERTICES, set = 0, scalar) readonly buffer Vertices { VertexBufferPtr vertex_buffers[]; };

I'm able to hotfix with a simple nullptr-check, but unsure if there is more to be done (@spencer-lunarg ?).
PR coming up

g_buffer_vert.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants