This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/5470] stap segfaults on parseko/probepoint08.stp
- From: "wenji dot huang at oracle dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 12 Dec 2007 02:52:11 -0000
- Subject: [Bug translator/5470] stap segfaults on parseko/probepoint08.stp
- References: <20071211190648.5470.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.