[PATCH] D98830: [libsupport] Silence a bogus valgrind warning.
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 17:45:11 PDT 2021
lattner updated this revision to Diff 331425.
lattner added a comment.
Trying to revise commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98830/new/
https://reviews.llvm.org/D98830
Files:
llvm/lib/Support/Unix/Process.inc
Index: llvm/lib/Support/Unix/Process.inc
===================================================================
--- llvm/lib/Support/Unix/Process.inc
+++ llvm/lib/Support/Unix/Process.inc
@@ -236,11 +236,10 @@
std::error_code Process::SafelyCloseFileDescriptor(int FD) {
// Create a signal set filled with *all* signals.
- sigset_t FullSet;
- if (sigfillset(&FullSet) < 0)
+ sigset_t FullSet, SavedSet;
+ if (sigfillset(&FullSet) < 0 || sigfillset(&SavedSet) < 0)
return std::error_code(errno, std::generic_category());
// Atomically swap our current signal mask with a full mask.
- sigset_t SavedSet;
#if LLVM_ENABLE_THREADS
if (int EC = pthread_sigmask(SIG_SETMASK, &FullSet, &SavedSet))
return std::error_code(EC, std::generic_category());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98830.331425.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/0e40642b/attachment.bin>
More information about the llvm-commits
mailing list