On Thu, Apr 10, 2014 at 01:52:09AM +0900, Masatake YAMATO wrote:
> In unwind part of tcb finalization, tcp->s_ent
> was accessed to decide whether pending stacktrace in tcp->queue
> should be printed or not.
> 
> However, s_ent can be NULL if invalid pid is given to strace
> as an trace target. Here invalid pid means that the pid is
> not associated with any process.

tcp->s_ent can be NULL iff either trace_syscall_entering hasn't been
called for this tcp yet, or the process disappeared before the first
trace_syscall_entering call for this tcp.

Another approach to fix this bug is to move unwind_tcb_init call from
alloctcb to the point where its result is going to be used for the first
time (unwind_stacktrace_capture and unwind_stacktrace_print).


-- 
ldv

Attachment: pgpDoEIPuhbmG.pgp
Description: PGP signature

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to