[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:46:00 PDT 2021
lattner updated this revision to Diff 331426.
lattner added a comment.
trying to fix 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,11 @@
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.331426.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/a8e9f250/attachment.bin>
More information about the llvm-commits
mailing list