diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2018-05-30 09:01:12 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2018-05-30 09:01:12 +0000 |
commit | c4b6d0ebab4cfa0942aed43f030f3d57179c112e (patch) | |
tree | be72544769b40276a162ab35157b347253cc1bf2 /llvm/lib/Support/Mutex.cpp | |
parent | f426fc7000fb6c4875cdcd846c07069f025b2e3d (diff) | |
download | bcm5719-llvm-c4b6d0ebab4cfa0942aed43f030f3d57179c112e.tar.gz bcm5719-llvm-c4b6d0ebab4cfa0942aed43f030f3d57179c112e.zip |
Revert commit 333506
It looks like this commit is responsible for the fail:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/24382.
llvm-svn: 333518
Diffstat (limited to 'llvm/lib/Support/Mutex.cpp')
-rw-r--r-- | llvm/lib/Support/Mutex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp index 7138c7a4b98..c70125f108e 100644 --- a/llvm/lib/Support/Mutex.cpp +++ b/llvm/lib/Support/Mutex.cpp @@ -47,7 +47,10 @@ MutexImpl::MutexImpl( bool recursive) { // Declare the pthread_mutex data structures pthread_mutex_t* mutex = - static_cast<pthread_mutex_t*>(safe_malloc(sizeof(pthread_mutex_t))); + static_cast<pthread_mutex_t*>(malloc(sizeof(pthread_mutex_t))); + + if (mutex == nullptr) + report_bad_alloc_error("Mutex allocation failed"); pthread_mutexattr_t attr; |