]> sourceware.org Git - systemtap.git/commitdiff
PR5376: probe alias parsing tweaks
authorFrank Ch. Eigler <fche@elastic.org>
Fri, 28 Nov 2008 17:06:27 +0000 (12:06 -0500)
committerFrank Ch. Eigler <fche@elastic.org>
Fri, 28 Nov 2008 17:06:27 +0000 (12:06 -0500)
ChangeLog
parse.cxx
testsuite/ChangeLog
testsuite/parseko/twentysix.stp [new file with mode: 0755]

index 038bf59efc83ce18ffc0ee4cd37018246c25e960..3874d620515ceeb388626a61d0ca3bc4fc95c268 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index 1982eb44be6d1135edc6a403c07f14b17acb9759..7f1e5d2a5fb9b2620d207e6776ef609bead4b631 100644 (file)
--- 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 ();
index df7a24f9db85c9049920797dab4678e0e5bee66e..d6fc7686a60b8fce46e09e205baf1ef1c15db82b 100644 (file)
@@ -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 (executable)
index 0000000..6f823f9
--- /dev/null
@@ -0,0 +1,4 @@
+#! stap -p1
+
+# PR 5376 case 3
+probe foo ? = begin { }
This page took 0.037962 seconds and 5 git commands to generate.