Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
diff --git a/tests/libs/dlopen_b.cpp b/tests/libs/dlopen_b.cpp
index cd81e16..092c96c 100644
--- a/tests/libs/dlopen_b.cpp
+++ b/tests/libs/dlopen_b.cpp
@@ -1,15 +1,14 @@
#include <dlfcn.h>
extern "C" void *dlopen_b() {
- // TODO (dimitry): this is to work around http://b/20049306
- // remove once it is fixed
- static int dummy = 0;
+ // Work around for http://b/20049306, which isn't going to be fixed.
+ static int defeat_sibling_call_optimization = 0;
// This is supposed to succeed because this library has DT_RUNPATH
// for libtest_dt_runpath_x.so which should be taken into account
// by dlopen.
void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
if (handle != nullptr) {
- dummy++;
+ defeat_sibling_call_optimization++;
return handle;
}
return nullptr;
diff --git a/tests/libs/elftls_dynamic.cpp b/tests/libs/elftls_dynamic.cpp
index 6da2f6f..2500484 100644
--- a/tests/libs/elftls_dynamic.cpp
+++ b/tests/libs/elftls_dynamic.cpp
@@ -41,8 +41,8 @@
// section, but does not have an entry in the dynsym table and whose
// solib-relative address appears to overlap with the large TLS variable.
extern "C" void* get_local_addr() {
- static char dummy[1024];
- return &dummy[512];
+ static char buf[1024];
+ return &buf[512];
}
// This variable comes from libtest_elftls_shared_var.so, which is part of