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
Hi,
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.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20161212/a699462d/attachment.bin>
More information about the Strace-devel
mailing list