[PATCH] D98830: [libsupport] Silence a bogus valgrind warning.
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 09:09:56 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGced725677869: [libsupport] Silence a bogus valgrind warning. (authored by lattner).
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.331584.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/bb7cb0ad/attachment.bin>
More information about the llvm-commits
mailing list