[Bug translator/5470] stap segfaults on parseko/probepoint08.stp
wenji dot huang at oracle dot com
sourceware-bugzilla@sourceware.org
Wed Dec 12 02:52:00 GMT 2007
------- Additional Comments From wenji dot huang at oracle dot com 2007-12-12 02:52 -------
> stap from CVS on Fedora 8 x86_64
>
> > stap probepoint08.stp
> Segmentation fault
I can also reproduce it. Seems that stap can't handle the unexpected end of file
well.
Created a short patch for it. Please review it.
--- src/parse.cxx 2007-12-12 09:07:12.000000000 -0500
+++ src.new/parse.cxx 2007-12-12 09:00:36.000000000 -0500
@@ -1343,14 +1343,14 @@ parser::parse_probe_point ()
{
next ();
t = peek ();
- if (! (t->type == tok_operator && t->content == "("))
+ if (t && ! (t->type == tok_operator && t->content == "("))
throw parse_error ("expected '('");
next ();
pl->condition = parse_expression ();
t = peek ();
- if (! (t->type == tok_operator && t->content == ")"))
+ if (t && ! (t->type == tok_operator && t->content == ")"))
throw parse_error ("expected ')'");
next ();
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5470
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Systemtap
mailing list