Skip to content

Don't crash on empty struct initializers - #4385

Merged
arcady-lunarg merged 1 commit into
KhronosGroup:mainfrom
arcady-lunarg:handle-empty-struct-initializer
Aug 17, 2026
Merged

arcady-lunarg merged 1 commit into
KhronosGroup:mainfrom
arcady-lunarg:handle-empty-struct-initializer

Conversation

@arcady-lunarg

Copy link
Copy Markdown
Contributor

Empty struct initializers aren't allowed in GLSL, however when cascading errors mode is enabled, the compiler would segfault in constant folding when accessing an improperly initialized struct. This change adds a bounds check to prevent the segfault.

Fixes #4017

Empty struct initializers aren't allowed in GLSL, however when cascading
errors mode is enabled, the compiler would segfault in constant folding
when accessing an improperly initialized struct. This change adds a
bounds check to prevent the segfault.

@jeremy-lunarg jeremy-lunarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arcady-lunarg
arcady-lunarg merged commit 5d69854 into KhronosGroup:main Aug 17, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault when parsing invalid syntax

2 participants