summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_hv_accept.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-07 08:38:16 -0700
committerEric Anholt <[email protected]>2010-07-07 09:07:52 -0700
commit773025b92c934014b9ceb4ebfdabcfc9d8587aa2 (patch)
treea64a23594a2fb889a45ef087931766e60cdb7136 /src/glsl/ir_hv_accept.cpp
parent570dc0d4004bf09d257b3e4c8664d3c26a8af510 (diff)
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.
Diffstat (limited to 'src/glsl/ir_hv_accept.cpp')
-rw-r--r--src/glsl/ir_hv_accept.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
index e772018a458..1a88c594394 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);
}