Patch: Fix libunwind segfault when -p is passed before -k
Dmitry V. Levin
ldv at altlinux.org
Mon Dec 12 10:53:29 UTC 2016
On Thu, Dec 08, 2016 at 10:00:59AM -1000, Sean Stangl wrote:
> There is a segfault if strace is called as `strace -p 2260 -k`.
> The -k flag sets a global bool stack_trace_enabled. But -p already consults
> stack_trace_enabled during tcb initialization. So if -p is passed first,
> the libunwind components of the tcb are uninitialized.
Good catch, thanks!
> The attached patch fixes this issue by having -k ensure that the libunwind
> components are initialized.
I think the patch needs a guard against multiple -k options to avoid
multiple late_unwind_tcb_init() invocations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Strace-devel