Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Driver] Force llvm to install its handlers before lldb's #27

Merged

Commits on Oct 25, 2019

  1. [Driver] Force llvm to install its handlers before lldb's

    Install llvm's signal handlers up front to prevent lldb's handlers from being
    ignored. This is (hopefully) a stopgap workaround.
    
    When lldb invokes an llvm API that installs signal handlers (e.g.
    llvm::sys::RemoveFileOnSignal, possibly via a compiler embedded within lldb),
    lldb's signal handlers are overriden if llvm is installing its handlers for the
    first time.
    
    To work around llvm's behavior, force it to install its handlers up front, and
    *then* install lldb's handlers. In practice this is used to prevent lldb test
    processes from exiting due to IO_ERR when SIGPIPE is received.
    
    Note that when llvm installs its handlers, it 1) records the old handlers it
    replaces and 2) re-installs the old handlers when its new handler is invoked.
    That means that a signal not explicitly handled by lldb can fall back to being
    handled by llvm's handler the first time it is received, and then by the
    default handler the second time it is received.
    
    Differential Revision: https://reviews.llvm.org/D69403
    
    (cherry picked from commit 0877dd1)
    vedantk committed Oct 25, 2019
    Configuration menu
    Copy the full SHA
    c654d29 View commit details
    Browse the repository at this point in the history