diff options
| author | 2025-03-13 11:52:32 -0700 | |
|---|---|---|
| committer | 2025-03-18 05:35:47 -0700 | |
| commit | 1abd2dcf05420499e95d91ed83d4c8de4a6c4c0d (patch) | |
| tree | 65b91b2ccd3bf518033aea1b82a65d8c08585a2a | |
| parent | 0d81e9de89e5605e8bd2e58bdac38b9b834960d5 (diff) | |
Remove workaround for arm32 Linux 3.4 kernels.
Kernels that old are well outside the support window.
Change-Id: Iecebd670ac43e81fc7a1757d46c07b05b412ccd9
| -rw-r--r-- | dex2oat/dex2oat.cc | 26 |
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 |