diff options
author | Igor Kudrin <ikudrin.dev@gmail.com> | 2016-09-29 08:11:57 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin.dev@gmail.com> | 2016-09-29 08:11:57 +0000 |
commit | 49df799762bd4f3824cfaf1c971c2d0a6ce02caf (patch) | |
tree | b3b81fa9f7763ba27208f0276b3761f7e8875427 /libcxxabi/src/cxa_exception_storage.cpp | |
parent | fdaaca8adec8b04cce549fa6ce17e9054092c177 (diff) | |
download | bcm5719-llvm-49df799762bd4f3824cfaf1c971c2d0a6ce02caf.tar.gz bcm5719-llvm-49df799762bd4f3824cfaf1c971c2d0a6ce02caf.zip |
Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion.
The test breaks build bots.
llvm-svn: 282703
Diffstat (limited to 'libcxxabi/src/cxa_exception_storage.cpp')
-rw-r--r-- | libcxxabi/src/cxa_exception_storage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp index ec69094c40c..235b0cf1dd3 100644 --- a/libcxxabi/src/cxa_exception_storage.cpp +++ b/libcxxabi/src/cxa_exception_storage.cpp @@ -45,8 +45,8 @@ extern "C" { #else #include <pthread.h> +#include <cstdlib> // for calloc, free #include "abort_message.h" -#include "fallback_malloc.h" // In general, we treat all pthread errors as fatal. // We cannot call std::terminate() because that will in turn @@ -58,7 +58,7 @@ namespace { pthread_once_t flag_ = PTHREAD_ONCE_INIT; void destruct_ (void *p) { - __free_with_fallback ( p ); + std::free ( p ); if ( 0 != ::pthread_setspecific ( key_, NULL ) ) abort_message("cannot zero out thread value for __cxa_get_globals()"); } @@ -77,7 +77,7 @@ extern "C" { // If this is the first time we've been asked for these globals, create them if ( NULL == retVal ) { retVal = static_cast<__cxa_eh_globals*> - (__calloc_with_fallback (1, sizeof (__cxa_eh_globals))); + (std::calloc (1, sizeof (__cxa_eh_globals))); if ( NULL == retVal ) abort_message("cannot allocate __cxa_eh_globals"); if ( 0 != pthread_setspecific ( key_, retVal ) ) |