@@ -536,12 +536,9 @@ static std::map<void*, std::shared_ptr<std::vector<uint64_t>>> g_stacktraces;
536536
537537#if CRASH_HOOKS_WRAPPED_CXX_ABI
538538// These come in through -Wl,-wrap
539- // It only works on GCC
540539extern " C" void * __real___cxa_allocate_exception (size_t thrown_size);
541540extern " C" void __real___cxa_free_exception (void * thrown_exception);
542- #if __clang__
543- #error not supported on WIN32 (no dlsym support)
544- #elif WIN32
541+ #if WIN32
545542extern " C" void __real__assert (const char *assertion, const char *file, unsigned int line);
546543extern " C" void __real__wassert (const wchar_t *assertion, const wchar_t *file, unsigned int line);
547544#else
@@ -560,13 +557,7 @@ extern "C" void __real___cxa_free_exception(void * thrown_exception)
560557 static auto f = (void (*)(void *))dlsym (RTLD_NEXT, " __cxa_free_exception" );
561558 return f (thrown_exception);
562559}
563- #if __clang__
564- extern " C" void __attribute__ ((noreturn)) __real___assert_rtn(const char *function, const char *file, int line, const char *assertion)
565- {
566- static auto f = (void (__attribute__ ((noreturn)) *) (const char *, const char *, int , const char *))dlsym (RTLD_NEXT, " __assert_rtn" );
567- f (function, file, line, assertion);
568- }
569- #elif WIN32
560+ #if WIN32
570561#error not supported on WIN32 (no dlsym support)
571562#else
572563extern " C" void __real___assert_fail (const char *assertion, const char *file, unsigned int line, const char *function)
@@ -625,15 +616,7 @@ static __attribute__((noinline)) crash_info GetCrashInfoFromAssertion(const char
625616 return ci;
626617}
627618
628- #if __clang__
629- extern " C" void __attribute__ ((noinline)) WRAPPED_NAME(__assert_rtn)(const char *function, const char *file, int line, const char *assertion)
630- {
631- auto ci = GetCrashInfoFromAssertion (assertion, file, line, function);
632- PrintCrashInfo (ci);
633- skipAbortSignal = true ;
634- __real___assert_rtn (function, file, line, assertion);
635- }
636- #elif WIN32
619+ #if WIN32
637620extern " C" void __attribute__ ((noinline)) WRAPPED_NAME(_assert)(const char *assertion, const char *file, unsigned int line)
638621{
639622 auto ci = GetCrashInfoFromAssertion (assertion, file, line, nullptr );
0 commit comments