public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/2205] New: Systemtap parser will fall into infinite loop.
@ 2006-01-25 11:48 hiramatu at sdl dot hitachi dot co dot jp
  2006-01-25 15:01 ` [Bug translator/2205] " fche at redhat dot com
  2006-02-01 20:40 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hiramatu at sdl dot hitachi dot co dot jp @ 2006-01-25 11:48 UTC (permalink / raw)
  To: systemtap

How reproducible:
Always

Steps to reproduce:
Run stap with the script below:
--
function testfunc () %{
// no end brace 
--
Then the stap command falls into infinite loop, after a while it hangs up.

Cause of the probrem:
Parser fails to check the EOF while parsing the embedded C code.

Solutions:
I think fix "EOF" check code at parse.cxx:600, as below.
-              if (c == 0) // EOF
+              if (c < 0) // EOF

-- 
           Summary: Systemtap parser will fall into infinite loop.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: hiramatu at sdl dot hitachi dot co dot jp


http://sourceware.org/bugzilla/show_bug.cgi?id=2205

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/2205] Systemtap parser will fall into infinite loop.
  2006-01-25 11:48 [Bug translator/2205] New: Systemtap parser will fall into infinite loop hiramatu at sdl dot hitachi dot co dot jp
@ 2006-01-25 15:01 ` fche at redhat dot com
  2006-02-01 20:40 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2006-01-25 15:01 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2006-01-25 15:01 -------
Patch applied.  Please feel free to test & commit such fixes yourself in the future.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=2205

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/2205] Systemtap parser will fall into infinite loop.
  2006-01-25 11:48 [Bug translator/2205] New: Systemtap parser will fall into infinite loop hiramatu at sdl dot hitachi dot co dot jp
  2006-01-25 15:01 ` [Bug translator/2205] " fche at redhat dot com
@ 2006-02-01 20:40 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2006-02-01 20:40 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2006-02-01 20:40 -------
By the way, labeling bugs like this one as "critical" is not really appropriate.
 The translator hanging on input with guru-mode syntax errors is not that
severe/important a problem.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2205

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-01 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 11:48 [Bug translator/2205] New: Systemtap parser will fall into infinite loop hiramatu at sdl dot hitachi dot co dot jp
2006-01-25 15:01 ` [Bug translator/2205] " fche at redhat dot com
2006-02-01 20:40 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).