[PATCH] D142224: [Support] Emulate SIGPIPE handling in raw_fd_ostream write for Windows

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 07:21:28 PST 2023


andrewng updated this revision to Diff 494302.
andrewng added a comment.

Updated for review suggestions.

> In D142224#4097437 <https://reviews.llvm.org/D142224#4097437>, @aganea wrote:
>
>> Sorry for the spam. Test coverage would be welcome too :-) The following should exercise the crash: `RUN: llvm-readobj --help | head -c1`
>
> Yes, I did consider adding something like this as a simple test but it does kind of assume that `llvm-readobj --help` is using `raw_ostream`. But if you think it has value then I'll add it.

I tried adding this "simple" test but unfortunately it doesn't reproduce the issue in lit. I think it has something to do with how lit handles the piping. Would it be OK without a test?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142224/new/

https://reviews.llvm.org/D142224

Files:
  clang/lib/Driver/Driver.cpp
  llvm/include/llvm/Support/ExitCodes.h
  llvm/include/llvm/Support/Signals.h
  llvm/lib/Support/Windows/Signals.inc
  llvm/lib/Support/raw_ostream.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142224.494302.patch
Type: text/x-patch
Size: 4774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230202/98de255c/attachment.bin>


More information about the llvm-commits mailing list