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

Sean Stangl sstangl at
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.

Sean Stangl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- 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: <>

More information about the Strace-devel mailing list