Bug 4865

Summary: ftrace gets java.lang.ArrayIndexOutOfBoundsException error when tracing frysk
Product: frysk Reporter: Rick Moseley <rmoseley>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1633    

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.