Bug 4324

Summary: slurp(pid) doesn't append trailing NUL
Product: frysk Reporter: Petr Machata <pmachata>
Component: generalAssignee: Petr Machata <pmachata>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: i686-redhat-linux-gnu Target: i686-redhat-linux-gnu
Build: i686-redhat-linux-gnu Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on:    
Bug Blocks: 1582    
Attachments: fix for this problem

Description Petr Machata 2007-04-05 18:03:55 UTC
I found a minor bug in uslurp(int pid, const char* name).  It doesn't
append a NUL character.  MapsBuilder.construct then throws an exception:

Exception in thread "Thread-1" java.lang.RuntimeException: missing NUL
   at frysk.sys.proc.MapsBuilder.construct(fltrace)
   at frysk.sys.proc.MapsBuilder.construct(fltrace)
   at fltrace.updateAttached(fltrace)
   at frysk.proc.Task.notifyAttached(fltrace)
   at frysk.proc.LinuxPtraceTaskState$Attached.transitionToRunningState(fltrace)
   at frysk.proc.LinuxPtraceTaskState$StartMainTask$6.blockOrAttachContinue(fltrace)
   at frysk.proc.LinuxPtraceTaskState$StartMainTask$6.handleTrappedEvent(fltrace)
   at frysk.proc.Task.processTrappedEvent(fltrace)
   at frysk.proc.LinuxPtraceHost$PollWaitOnSigChld$5.stopped(fltrace)
   at frysk.sys.Wait.waitAllNoHang(fltrace)
   at frysk.proc.LinuxPtraceHost$PollWaitOnSigChld.execute(fltrace)
   at frysk.event.EventLoop.runEventLoop(fltrace)
   at frysk.event.EventLoop.run(fltrace)
Comment 1 Petr Machata 2007-04-05 18:05:08 UTC
Created attachment 1670 [details]
fix for this problem

Tested on clean today's checkout, no regressions.
Comment 2 Petr Machata 2007-04-05 18:13:40 UTC
Not sure if I assigned it to right tracker bug.
Comment 3 Petr Machata 2007-04-20 15:50:49 UTC
Fix commited.