| commit | 27c788de759472316169795fa06d592221ac602e | [log] [tgz] |
|---|---|---|
| author | John Harrison <harjohn@google.com> | Thu Mar 06 22:57:06 2025 +0100 |
| committer | GitHub <noreply@github.com> | Thu Mar 06 13:57:06 2025 -0800 |
| tree | 8eccd71a3f8495b6fecdc51940e5961ced42ceae | |
| parent | 462eb7e28ef4507b16a4b45efb356bc6a3523615 [diff] |
[lldb-dap] Restore the override FD used by the output redirect on stop. (#129964) While running lldb-dap over stdin/stdout the `stdout` and `stderr` FD's are replaced with a pipe that is reading the output to forward to the dap client. During shutdown we were not properly restoring those FDs, which means if any component attempted to write to stderr it would trigger a SIGPIPE due to the pipe being closed during the shutdown process. This can happen if we have an error reported from the `DAP::Loop` call that would then log to stderr, such as an error parsing a malformed DAP message or if lldb-dap crashed and it was trying to write the stack trace to stderr. There is one place we were not handling an `llvm::Error` if there was no logging setup that could trigger this condition. To address this, I updated the OutputRedirector to restore the FD to the prior state when `Stop` is called. --------- Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.