Hi,
Looking at the code, is there a potential memory leak in GLSL parser wrt
extension statements?
glsl_lexer.ll has:
<PP>[_a-zA-Z][_a-zA-Z0-9]* {
yylval->identifier = strdup(yytext);
return IDENTIFIER;
}
i.e. calls strdup on the token (there's one other place that calls strdup;
whereas most regular identifiers use ralloc_strdup for easier memory
management.
glsl_parser.yy has this:
extension_statement:
EXTENSION any_identifier COLON any_identifier EOL
{
if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) {
YYERROR;
}
}
;
which looks like it processes the extension identifiers, but never
frees the memory.
--
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev