From 7acccdbc37a3fd52691a09afdf333c33fc4ccae7 Mon Sep 17 00:00:00 2001 From: Emil Kosz Date: Fri, 18 Sep 2026 20:42:33 +0200 Subject: [PATCH] patch: fix 0001 --- 0001-art-mem-map-fix-mmap-on-kernel-518.patch | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/0001-art-mem-map-fix-mmap-on-kernel-518.patch b/0001-art-mem-map-fix-mmap-on-kernel-518.patch index 5fed49a..bccfcba 100644 --- a/0001-art-mem-map-fix-mmap-on-kernel-518.patch +++ b/0001-art-mem-map-fix-mmap-on-kernel-518.patch @@ -1,23 +1,9 @@ -From: rubenslte-builder -Date: Sat, 13 Sep 2026 21:00:00 +0200 -Subject: [PATCH 1/1] art-mem-map-fix-mmap-on-kernel-518 - -Workaround for mmap error when building on Linux kernel 5.18+. -Adds MAP_FIXED_NOREPLACE in MapFileAtAddress (host builds only, -guarded by #if !defined(ART_TARGET)), forcing the kernel to honor -the expected address instead of mapping at a different one. - -Fixes: android-review.googlesource.com/c/platform/art/+/673bd2c638ed82bbe71cf7d645d433973a624e4f -Bug: 23318356 ---- - diff --git a/art/runtime/mem_map.cc b/art/runtime/mem_map.cc - index b9d51c1..f034a3d 100644 - --- a/art/runtime/mem_map.cc - +++ b/art/runtime/mem_map.cc - @@ -393,7 +393,12 @@ - DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) - << ((error_msg != nullptr) ? *error_msg : std::string()); - flags |= MAP_FIXED; +--- a/art/runtime/mem_map.cc 2026-09-17 09:32:04.741988772 +0200 ++++ b/art/runtime/mem_map.cc 2026-09-17 09:32:26.208150692 +0200 +@@ -393,6 +393,11 @@ + DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) + << ((error_msg != nullptr) ? *error_msg : std::string()); + flags |= MAP_FIXED; +#if !defined(ART_TARGET) + } else if (expected_ptr) { +#define MAP_FIXED_NOREPLACE 0x100000 @@ -26,4 +12,3 @@ Bug: 23318356 } else { CHECK_EQ(0, flags & MAP_FIXED); // Don't bother checking for an overlapping region here. We'll - // check this if required after the fact inside CheckMapRequest.