Patch: Fix libunwind segfault when -p is passed before -k

Sean Stangl sstangl at mozilla.com
Thu Dec 8 20:00:59 UTC 2016


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.

The attached patch fixes this issue by having -k ensure that the libunwind
components are initialized.

Best,
Sean Stangl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20161208/c49712f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-libunwind-segfault-when-p-is-passed-before-k.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20161208/c49712f0/attachment.bin>


More information about the Strace-devel mailing list