Make atexit.dlclose work for glibc

* build libtest_atexit.so
 * remove atexit(NULL) - glibc segfaults on it

Bug: 15350494
Change-Id: I27d79130c32c5691b0e8790a57d92f9710f5bf4a
This commit is contained in:
Dmitriy Ivanov
2014-05-30 18:03:26 -07:00
parent 66b5e6b609
commit 214e64135e
3 changed files with 3 additions and 6 deletions

View File

@@ -25,7 +25,6 @@
#include <string>
TEST(atexit, dlclose) {
#if defined(__BIONIC__)
std::string atexit_call_sequence;
bool valid_this_in_static_dtor = false;
void* handle = dlopen("libtest_atexit.so", RTLD_NOW);
@@ -39,9 +38,6 @@ TEST(atexit, dlclose) {
// this test verifies atexit call from atexit handler. as well as the order of calls
ASSERT_EQ("Humpty Dumpty sat on a wall", atexit_call_sequence);
ASSERT_TRUE(valid_this_in_static_dtor);
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.";
#endif // __BIONIC__
}
class TestMainStaticDtorClass {