summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dex2oat/dex2oat.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 39b0d826b4..5586fafb47 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -33,10 +33,6 @@
#if defined(__linux__)
#include <sched.h>
-#if defined(__arm__)
-#include <sys/personality.h>
-#include <sys/utsname.h>
-#endif // __arm__
#endif
#include <android-base/parseint.h>
@@ -3040,26 +3036,6 @@ class Dex2Oat final {
DISALLOW_IMPLICIT_CONSTRUCTORS(Dex2Oat);
};
-static void b13564922() {
-#if defined(__linux__) && defined(__arm__)
- int major, minor;
- struct utsname uts;
- if (uname(&uts) != -1 &&
- sscanf(uts.release, "%d.%d", &major, &minor) == 2 &&
- ((major < 3) || ((major == 3) && (minor < 4)))) {
- // Kernels before 3.4 don't handle the ASLR well and we can run out of address
- // space (http://b/13564922). Work around the issue by inhibiting further mmap() randomization.
- int old_personality = personality(0xffffffff);
- if ((old_personality & ADDR_NO_RANDOMIZE) == 0) {
- int new_personality = personality(old_personality | ADDR_NO_RANDOMIZE);
- if (new_personality == -1) {
- LOG(WARNING) << "personality(. | ADDR_NO_RANDOMIZE) failed.";
- }
- }
- }
-#endif
-}
-
class ScopedGlobalRef {
public:
explicit ScopedGlobalRef(jobject obj) : obj_(obj) {}
@@ -3123,8 +3099,6 @@ static dex2oat::ReturnCode DoCompilation(Dex2Oat& dex2oat) REQUIRES(!Locks::muta
}
static dex2oat::ReturnCode Dex2oat(int argc, char** argv) {
- b13564922();
-
TimingLogger timings("compiler", false, false);
// Allocate `dex2oat` on the heap instead of on the stack, as Clang