This set of tests intentionally provides erroneous call arguments in
order to generate GL errors. As a result, the GL functions' output
arguments won't always be written to. The problem is, we bounce these
functions through CallLogWrapper, which expects the output arguments
to have valid contents, and will attempt to log them to file,
potentially resulting in unexpected process termination.
This change initializes the output arguments beforehand to valid values
so that CallLogWrapper doesn't unintentionally access invalid memory.
VK-GL-CTS issue 603
Components: OpenGL
Affects:
* KHR-GLES31.core.program_interface_query.invalid-enum
* KHR-GLES31.core.program_interface_query.invalid-operation
* KHR-GLES31.core.program_interface_query.invalid-value
* KHR-GL43/44/45.program_interface_query.invalid-enum
* KHR-GL43/44/45.program_interface_query.invalid-operation
* KHR-GL43/44/45.program_interface_query.invalid-value
Change-Id: I5fae2d4505e9c70cbcb2fbd11bdf900c0b4c751a
{
long error = NO_ERROR;
- GLint res;
- GLsizei len;
+ GLint res = 0;
+ GLsizei len = 0;
GLchar name[100] = { '\0' };
GLenum props[1] = { GL_NAME_LENGTH };
long error = NO_ERROR;
- GLint res;
- GLsizei len;
+ GLint res = 0;
+ GLsizei len = 0;
GLchar name[100] = { '\0' };
GLenum props[1] = { GL_TEXTURE_1D };
LinkProgram(program);
const GLuint sh = glCreateShader(GL_FRAGMENT_SHADER);
- GLint res;
- GLsizei len;
+ GLint res = 0;
+ GLsizei len = 0;
GLchar name[100] = { '\0' };
GLenum props[1] = { GL_OFFSET };