This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/5470] stap segfaults on parseko/probepoint08.stp


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]