Mesa (glsl2): glsl2: Don' t forget to walk the parameters to a function in the hv.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Jul 7 16:16:44 UTC 2010
Module: Mesa
Branch: glsl2
Commit: 773025b92c934014b9ceb4ebfdabcfc9d8587aa2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=773025b92c934014b9ceb4ebfdabcfc9d8587aa2
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jul 7 08:38:16 2010 -0700
glsl2: Don't forget to walk the parameters to a function in the hv.
Fixes segfaults from use after free after the steal of ir nodes and
free of the compile context.
---
src/glsl/ir_hv_accept.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
index e772018..1a88c59 100644
--- a/src/glsl/ir_hv_accept.cpp
+++ b/src/glsl/ir_hv_accept.cpp
@@ -116,6 +116,10 @@ ir_function_signature::accept(ir_hierarchical_visitor *v)
if (s != visit_continue)
return (s == visit_continue_with_parent) ? visit_continue : s;
+ s = visit_list_elements(v, &this->parameters);
+ if (s == visit_stop)
+ return s;
+
s = visit_list_elements(v, &this->body);
return (s == visit_stop) ? s : v->visit_leave(this);
}
More information about the mesa-commit
mailing list