From 1ad820e32419c6ff9237962ec911e9c4eee79c4a Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 28 Nov 2008 12:06:27 -0500 Subject: PR5376: probe alias parsing tweaks --- ChangeLog | 6 ++++++ parse.cxx | 4 ++++ testsuite/ChangeLog | 5 +++++ testsuite/parseko/twentysix.stp | 4 ++++ 4 files changed, 19 insertions(+) create mode 100755 testsuite/parseko/twentysix.stp diff --git a/ChangeLog b/ChangeLog index 038bf59e..3874d620 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-28 Frank Ch. Eigler + + PR 5376. + * parse.cxx (parse::parse_probe): Prevent alias names from + being marked "?" or "!". + 2008-11-28 Frank Ch. Eigler PR 6477. 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_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_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 + + PR5376. + * parseko/twentysix: New test. + 2008-11-26 Stan Cox * 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 { } -- cgit