Package: libunwind-dev
Version: 1.1-4.1
Severity: important

Dear Maintainer,

The latest version of libunwind8 package available in Debian repository
has significant problems with signal handling. I noted that setcontext()
implementation on x86_64 calls sigprocmask() with random uninitialized values,
which leads to unpredictable behaviour for aplications which uses signals.

Moreover, due to fact that "--enable-cxx-exceptions" is turned on by default,
libunwind may be used (it depends on the link order) by C++ runtime to throw
C++ exceptions. That means that almost all C++ applications linked with
libunwind.so.8 are broken too.

This problem has already been fixed by upstream [1].

[1] git://git.sv.gnu.org/libunwind.git

Could you please update libunwind package in Debian?

--------------------------------------------------------------------------------
commit 29483327bebaf6e0141a9bee8bb99552a63f1583
Author: Dave Watson <davejwat...@fb.com>
Date:   Wed Nov 30 11:40:20 2016 -0800

    x86_64: Use sigprocmask from signal frames
    
    Currently setcontext for x86_64 restores the signal mask, even
    though it is never saved anywhere.  This means the signal mask
    is often garbage after an unw_resume.
    
    (changed in commit f8a15e9679e59872ca2)
    
    It looks like this was a fix for the Gtest-resume-sig function -
    testing if signal masks are restored across signal frames.  The
    root issue looks like that x86_64 only uses sigreturn for the exact
    signal frame, and not for any decedant frames as well (as i64 does).
    
    Instead, modify Gresume to use sigreturn if *any* frame on the stack
    is a signal frame, so that we correct fixup the signal mask and any
    sigaltstacks.  The sigreturn os-specific functions are changed slightly
    to copy in the saved ucontext structure if we are jumping farther
    up the stack.
    
    This should fix sigprocmask reported issues such as
    
https://github.com/dropbox/pyston/blob/master/libunwind_patches/0002-pyston-stop-x86_64-setcontext-restoring-uninitialize.patch
    
    Tests pass on freebsd, linux

--------------------------------------------------------------------------------

-- System Information:
Debian Release: 9.0
  APT prefers stable
  APT policy: (990, 'stable'), (600, 'experimental'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf, i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libunwind-dev depends on:
ii  libunwind8  1.1-4.1

libunwind-dev recommends no packages.

libunwind-dev suggests no packages.

-- no debconf information

-- 
WBR,
  Roman Tsisyk <ro...@tarantool.org>
  http://tarantool.org/

Reply via email to