summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-04-27 22:35:05 -0400
committerWenji Huang <wenji.huang@oracle.com>2009-04-27 22:44:12 -0400
commited82b7c902d6a2e26452ec51c9cdb9665dbf9e97 (patch)
tree6711912b2176b8a212b0153bb5bf8dc203e51a10 /elaborate.cxx
parentd478560c710a8966de96f54c0145ccaa7e2f4c5f (diff)
downloadsystemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.tar.gz
systemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.tar.xz
systemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.zip
PR10102: tolerate mismatched optional probe
* elaborate.cxx: Early return for mismatched optional probe. * testsuite/systemtap.base/optionalprobe.exp: New test case. * testsuite/systemtap.base/optionalprobe.stp: Ditto.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 47b77c9b..53f2a8f6 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -406,6 +406,9 @@ match_node::find_and_build (systemtap_session& s,
sub_map_iterator_t i = sub.find (match);
if (i == sub.end()) // no match
{
+ if (loc->optional) /* PR10102: to tolerate mismatched optional probe */
+ return;
+
string alternatives;
for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++)
alternatives += string(" ") + i->first.str();