summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2021-05-13 18:37:06 -0700
committerPirama Arumuga Nainar <pirama@google.com>2021-05-19 10:38:58 -0700
commitf17f43e0c202b3c7f19ad103024b541eb8dd250f (patch)
tree1e7715acd1c73a9fae1787eb13f12794d604d5cf
parente1e3b812931a3756223470a109af6c950e754b55 (diff)
downloadextras-f17f43e0c202b3c7f19ad103024b541eb8dd250f.tar.gz
Make constructor and at_exit handler non-static
Bug: http://b/187935521 This change fixes a crash in dalvikvm. These functions were mistakenly marked as static but doesn't need to be. Test: m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art"; atest -v art-run-test-001-HelloWorld Change-Id: I515addc298633437f1a91cf5e96d17c28c7a61ff (cherry picked from commit d795a881fd2d3c213837cdc6c160e9ad3a92d8cc)
-rw-r--r--toolchain-extras/profile-clang-extras.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/toolchain-extras/profile-clang-extras.cpp b/toolchain-extras/profile-clang-extras.cpp
index 3efe321a..4e5aca97 100644
--- a/toolchain-extras/profile-clang-extras.cpp
+++ b/toolchain-extras/profile-clang-extras.cpp
@@ -37,11 +37,11 @@ static void llvm_signal_handler(__unused int signum) {
}
#if __ANDROID_API__ >= 21
-static void writeFileWithoutReturn() {
+void writeFileWithoutReturn() {
__llvm_profile_write_file();
}
-static __attribute__((constructor)) void register_quick_exit_handler(void) {
+__attribute__((constructor)) void register_quick_exit_handler(void) {
at_quick_exit(writeFileWithoutReturn);
}
#endif // #if __ANDROID_API__ >= 21