From 760b4c4f3bb0cc9998e41bbed048491a23fa4a6a Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Tue, 30 Dec 2014 02:20:41 -0800 Subject: [PATCH] fix __cxa_throw signature Summary: `__cxa_throw` signature didn't match C++ ABI (see 2.4.3 in http://refspecs.linuxfoundation.org/abi-eh-1.22.html), gcc 4.9 was complaining. Test Plan: fbconfig -r folly && fbmake opt -j32 Reviewed By: soren@fb.com Subscribers: folly-diffs@ FB internal diff: D1760492 Tasks: 5908365 Signature: t1:1760492:1420251038:6d04683f96ac889ff348ca0485420c975819b90b --- .../exception_tracer/ExceptionTracerLib.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp index 8643623d..20c0896a 100644 --- a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp +++ b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp @@ -30,7 +30,8 @@ namespace __cxxabiv1 { extern "C" { FOLLY_NORETURN void __cxa_throw(void* thrownException, - std::type_info* type, void (*destructor)(void)); + std::type_info* type, + void (*destructor)(void*)); void* __cxa_begin_catch(void* excObj); FOLLY_NORETURN void __cxa_rethrow(void); void __cxa_end_catch(void); @@ -48,8 +49,9 @@ FOLLY_TLS StackTraceStack caughtExceptions; pthread_once_t initialized = PTHREAD_ONCE_INIT; extern "C" { -FOLLY_NORETURN typedef void (*CxaThrowType)(void*, std::type_info*, - void (*)(void)); +FOLLY_NORETURN typedef void (*CxaThrowType)(void*, + std::type_info*, + void (*)(void*)); typedef void* (*CxaBeginCatchType)(void*); FOLLY_NORETURN typedef void (*CxaRethrowType)(void); typedef void (*CxaEndCatchType)(void); @@ -123,8 +125,9 @@ void moveTopException(StackTraceStack& from, StackTraceStack& to) { namespace __cxxabiv1 { -void __cxa_throw(void* thrownException, std::type_info* type, - void (*destructor)(void)) { +void __cxa_throw(void* thrownException, + std::type_info* type, + void (*destructor)(void*)) { addActiveException(); orig_cxa_throw(thrownException, type, destructor); } -- 2.34.1