KhronosGroup / KhronosGroup/glslang

Undeclared identifier as function parameter causes null dereference.

Open
#2,650 0 comments 0 reactions 1 assignee Claimed by @greg-lunarg View on GitHub
bug GLSL/ESSL
Dominant language
C++
Stars
3.6k
Forks
990
Avg merge
1d 2h
Merged PRs (30d)
31

Description

If the shader source has an undeclared identifier used as a parameter to a function expecting a struct, [glsTType::sameStructType.](https://github.com/KhronosGroup/glslang/blob/master/glslang/Include/Types.h#L2368) will dereference a null pointer.
```
#version 460 core

struct S {
float f;
};

void Fun(in S a)
{
}

void main()
{
Fun(a);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.