Bug 4865 - ftrace gets java.lang.ArrayIndexOutOfBoundsException error when tracing frysk
Summary: ftrace gets java.lang.ArrayIndexOutOfBoundsException error when tracing frysk
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 1633
  Show dependency treegraph
 
Reported: 2007-07-30 15:54 UTC by Rick Moseley
Modified: 2007-07-31 10:53 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2007-07-30 15:54:11 UTC
When I activate frysk and try to trace it using ftrace I get the following
stacktrace:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 24
   at frysk.proc.LinuxIa32Syscall.syscallByNum(LinuxIa32Syscall.java:574)
   at frysk.proc.LinuxIa32$1.getSyscall(LinuxIa32.java:66)
   at frysk.util.Ftrace$2.updateSyscallEnter(Ftrace.java:299)
   at frysk.proc.Task.notifySyscallEnter(Task.java:764)
   at
frysk.proc.live.LinuxTaskState$Running.handleSyscalledEvent(LinuxTaskState.java:1042)
   at frysk.proc.live.LinuxTask.processSyscalledEvent(LinuxTask.java:194)
   at frysk.proc.live.LinuxWaitBuilder.syscallEvent(LinuxWaitBuilder.java:189)
   at frysk.sys.Wait.wait(Wait.cxx:568)
   at frysk.sys.Wait.waitAll(Wait.java:106)
   at frysk.event.WaitEventLoop.block(WaitEventLoop.java:88)
   at frysk.event.EventLoop.runEventLoop(EventLoop.java:380)
   at frysk.event.EventLoop.run(EventLoop.java:485)
   at frysk.util.Ftrace.trace(Ftrace.java:151)
   at frysk.bindir.ftrace.run(ftrace.java:185)
   at frysk.bindir.ftrace.main(ftrace.java:198)
Comment 1 Mark Wielaard 2007-07-31 10:08:58 UTC
This seems to work fine on x86_64 Fedora Core 6.
Comment 2 Mark Wielaard 2007-07-31 10:32:41 UTC
Off by one in ipc subcall list on x86. Testing a patch.
Comment 3 Mark Wielaard 2007-07-31 10:53:07 UTC
2007-07-31  Mark Wielaard  <mwielaard@redhat.com>

    Fixes bug #4865
    * LinuxIa32Syscall.java (unknownIpcSubSyscall): New static field.
    (unknownSocketSubSyscall): Likewise.
    (ipcSubcallList): Add unknown numbers, including zero.
    (syscallByNum): Bounds check socketSubcallList and ipcSubcallList
    arrays before returning possible unknown subsyscall.