diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-04-02 18:47:33 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-04-02 18:55:59 +0800 |
commit | 6ce5868afdf35ad36ca451492fa0541e881d4938 (patch) | |
tree | 6a6709d0ca8d73b703b3aaf4a493d4f25b63d5f9 | |
parent | 5e96f54d8c7a2cf95f1902a4d5a79e7962232c3a (diff) | |
download | toolchain_gcc-6ce5868afdf35ad36ca451492fa0541e881d4938.tar.gz toolchain_gcc-6ce5868afdf35ad36ca451492fa0541e881d4938.tar.bz2 toolchain_gcc-6ce5868afdf35ad36ca451492fa0541e881d4938.zip |
[4.8] Workaround for Android __cxa_finalize bug
Used to be local NDK patch at $NDK/build/tools/toolchain-patches/
gcc/0003-Work-around-for-Android-__cxa_finalize-bug.patch
See c3e4e5654d02106a19f315b736d56acb581246f9
Change-Id: I2c24a06f96cd183e9b250d22dacd2379b9f10b04
-rw-r--r-- | gcc-4.8/libstdc++-v3/libsupc++/eh_globals.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc-4.8/libstdc++-v3/libsupc++/eh_globals.cc b/gcc-4.8/libstdc++-v3/libsupc++/eh_globals.cc index 5d4ad647b..3c28cf9b5 100644 --- a/gcc-4.8/libstdc++-v3/libsupc++/eh_globals.cc +++ b/gcc-4.8/libstdc++-v3/libsupc++/eh_globals.cc @@ -100,6 +100,14 @@ struct __eh_globals_init ~__eh_globals_init() { + /* Work-around for an Android-specific bug, where this destructor + * is called with a NULL object pointer. This is due to a bug in the + * __cxa_finalize() implementation that was only fixed in 2.2. + */ +#ifdef __ANDROID__ + if (this == NULL) + return; +#endif if (_M_init) __gthread_key_delete(_M_key); _M_init = false; |