mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
glcpp: Fully initialize struct gl_context
valgrind flagged members of gl_ctx->Extensions being used uninitialized: ==23417== Conditional jump or move depends on uninitialised value(s) ==23417== at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493) ==23417== by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132) ==23417== by 0x11A515: glcpp_lex (glcpp-lex.l:547) ==23417== by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302) ==23417== by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871) ==23417== by 0x11ADC6: glcpp_preprocess (pp.c:238) ==23417== by 0x111384: main (glcpp.c:174) ==23417== Uninitialised value was created by a stack allocation ==23417== at 0x111295: main (glcpp.c:136) Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
This commit is contained in:
parent
1eb3a2d8da
commit
37855fd59d
1 changed files with 1 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ load_text_file(void *ctx, const char *filename)
|
|||
static void
|
||||
init_fake_gl_context (struct gl_context *gl_ctx)
|
||||
{
|
||||
memset(gl_ctx, 0, sizeof(*gl_ctx));
|
||||
gl_ctx->API = API_OPENGL_COMPAT;
|
||||
gl_ctx->Const.DisableGLSLLineContinuations = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue