summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-06-25 11:50:47 -0400
committerDave Brolley <brolley@redhat.com>2009-06-25 11:50:47 -0400
commit313db8e6d1e62f372d168b7368f220cb432d07d6 (patch)
tree54fdfdbc16b25dfab4e7b3b025971e4adf420e7d /elaborate.cxx
parentf75b6811dee35832309e55a9e3455c40d4c13437 (diff)
downloadsystemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.tar.gz
systemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.tar.xz
systemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.zip
Disallow embedded C in tapset functions ifor unprivileged users unless tagged by /* unprivileged */.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index f0c6c5a9..e7ea7b23 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1044,7 +1044,7 @@ semantic_pass_conditions (systemtap_session & sess)
expression* e = p->sole_location()->condition;
if (e)
{
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(sess);
e->visit (& vut);
if (! vut.written.empty())
@@ -1199,7 +1199,7 @@ void add_global_var_display (systemtap_session& s)
// it would clutter up the list of probe points with "end ...".
if (s.listing_mode) return;
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(s);
for (unsigned i=0; i<s.probes.size(); i++)
{
s.probes[i]->body->visit (& vut);
@@ -1986,7 +1986,7 @@ void semantic_pass_opt1 (systemtap_session& s, bool& relaxed_p)
// written nor read.
void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p, unsigned iterations)
{
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(s);
for (unsigned i=0; i<s.probes.size(); i++)
{
@@ -2183,7 +2183,7 @@ dead_assignment_remover::visit_assignment (assignment* e)
break;
}
- varuse_collecting_visitor lvut;
+ varuse_collecting_visitor lvut(session);
e->left->visit (& lvut);
if (lvut.side_effect_free () && !is_global) // XXX: use _wrt() once we track focal_vars
{
@@ -2216,7 +2216,7 @@ void semantic_pass_opt3 (systemtap_session& s, bool& relaxed_p)
// Recompute the varuse data, which will probably match the opt2
// copy of the computation, except for those totally unused
// variables that opt2 removed.
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(s);
for (unsigned i=0; i<s.probes.size(); i++)
s.probes[i]->body->visit (& vut); // includes reachable functions too
@@ -2320,7 +2320,7 @@ dead_stmtexpr_remover::visit_if_statement (if_statement *s)
{
// We may be able to elide this statement, if the condition
// expression is side-effect-free.
- varuse_collecting_visitor vct;
+ varuse_collecting_visitor vct(session);
s->condition->visit(& vct);
if (vct.side_effect_free ())
{
@@ -2384,7 +2384,7 @@ dead_stmtexpr_remover::visit_for_loop (for_loop *s)
{
// We may be able to elide this statement, if the condition
// expression is side-effect-free.
- varuse_collecting_visitor vct;
+ varuse_collecting_visitor vct(session);
if (s->init) s->init->visit(& vct);
s->cond->visit(& vct);
if (s->incr) s->incr->visit(& vct);
@@ -2421,7 +2421,7 @@ dead_stmtexpr_remover::visit_expr_statement (expr_statement *s)
// NB. While we don't share nodes in the parse tree, let's not
// deallocate *s anyway, just in case...
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(session);
s->value->visit (& vut);
if (vut.side_effect_free_wrt (focal_vars))
@@ -2761,7 +2761,7 @@ void_statement_reducer::visit_functioncall (functioncall* e)
return;
}
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(session);
vut.traversed.insert (e->referent);
vut.current_function = e->referent;
e->referent->body->visit (& vut);