From 6daa64bd1c37e894ed417b5a9d0fc81631a4801b Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 26 Nov 2007 15:11:48 +0000 Subject: * conditional-probe SEGV fix 2007-11-26 Frank Ch. Eigler * elaborate.cxx (derived_probe ctor): Don't duplicate condition if it doesn't exist. --- ChangeLog | 5 +++++ elaborate.cxx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 83e56786..c3ce7926 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-26 Frank Ch. Eigler + + * elaborate.cxx (derived_probe ctor): Don't duplicate condition + if it doesn't exist. + 2007-11-20 Masami Hiramatsu PR 4935. diff --git a/elaborate.cxx b/elaborate.cxx index d3bbe28d..c277d8d5 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -53,7 +53,8 @@ derived_probe::derived_probe (probe *p, probe_point *l): { if (p) { - this->condition = deep_copy_visitor::deep_copy(p->condition); + if (p->condition) + this->condition = deep_copy_visitor::deep_copy(p->condition); this->tok = p->tok; this->privileged = p->privileged; this->body = deep_copy_visitor::deep_copy(p->body); -- cgit From 80342244a32145487eacb1391cad9df5884ced9d Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 26 Nov 2007 15:46:36 +0000 Subject: * conditional probe thinko fix cont'd --- ChangeLog | 1 + staptree.cxx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3ce7926..cde76f43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * elaborate.cxx (derived_probe ctor): Don't duplicate condition if it doesn't exist. + * staptree.cxx (probe_point, probe ctors): Initialize to 0. 2007-11-20 Masami Hiramatsu diff --git a/staptree.cxx b/staptree.cxx index 42fc8c24..d0b4a0ed 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -76,19 +76,19 @@ symboldecl::~symboldecl () probe_point::probe_point (std::vector const & comps, const token * t): components(comps), tok(t), optional (false), sufficient (false), - condition (NULL) + condition (0) { } probe_point::probe_point (): - tok (0), optional (false), sufficient (false), condition (NULL) + tok (0), optional (false), sufficient (false), condition (0) { } unsigned probe::last_probeidx = 0; probe::probe (): - body (0), tok (0) + body (0), tok (0), condition (0) { this->name = string ("probe_") + lex_cast(last_probeidx ++); } -- cgit