summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
index 2489bfc972c..5dd6a40a0eb 100644
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
@@ -36,7 +36,9 @@ void* operator new(std::size_t s) throw(std::bad_alloc)
throw std::bad_alloc();
--throw_one;
++outstanding_new;
- return std::malloc(s);
+ void* ret = std::malloc(s);
+ if (!ret) std::abort(); // placate MSVC's unchecked malloc warning
+ return ret;
}
void operator delete(void* p) throw()
OpenPOWER on IntegriCloud