summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--parse.cxx4
-rw-r--r--testsuite/ChangeLog5
-rwxr-xr-xtestsuite/parseko/twentysix.stp4
4 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 038bf59e..3874d620 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-28 Frank Ch. Eigler <fche@elastic.org>
+ PR 5376.
+ * parse.cxx (parse::parse_probe): Prevent alias names from
+ being marked "?" or "!".
+
+2008-11-28 Frank Ch. Eigler <fche@elastic.org>
+
PR 6477.
* elaborate.cxx (print_error_source, print_warning): Tolerate
NULL token.
diff --git a/parse.cxx b/parse.cxx
index 1982eb44..7f1e5d2a 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -1073,6 +1073,8 @@ parser::parse_probe (std::vector<probe *> & probe_ret,
if (equals_ok && t
&& t->type == tok_operator && t->content == "=")
{
+ if (pp->optional || pp->sufficient)
+ throw parse_error ("probe point alias name cannot be optional nor sufficient", pp->tok);
aliases.push_back(pp);
next ();
continue;
@@ -1080,6 +1082,8 @@ parser::parse_probe (std::vector<probe *> & probe_ret,
else if (equals_ok && t
&& t->type == tok_operator && t->content == "+=")
{
+ if (pp->optional || pp->sufficient)
+ throw parse_error ("probe point alias name cannot be optional nor sufficient", pp->tok);
aliases.push_back(pp);
epilogue_alias = 1;
next ();
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index df7a24f9..d6fc7686 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-28 Frank Ch. Eigler <fche@elastic.org>
+
+ PR5376.
+ * parseko/twentysix: New test.
+
2008-11-26 Stan Cox <scox@redhat.com>
* systemtap.base/static_uprobes.exp: Check debuginfo static uprobes.
diff --git a/testsuite/parseko/twentysix.stp b/testsuite/parseko/twentysix.stp
new file mode 100755
index 00000000..6f823f90
--- /dev/null
+++ b/testsuite/parseko/twentysix.stp
@@ -0,0 +1,4 @@
+#! stap -p1
+
+# PR 5376 case 3
+probe foo ? = begin { }