Merge changes Ibce7bd9d,Ieab5af35
* changes:
Turn on XOM for libc
Switch libc to libcrt.builtins
diff --git a/libdl/Android.bp b/libdl/Android.bp
index 43ddbfe..642cc7a 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -92,6 +92,8 @@
nocrt: true,
system_shared_libs: [],
+
+ // Opt out of native_coverage when opting out of system_shared_libs
native_coverage: false,
// This is placeholder library the actual implementation is (currently)
diff --git a/tests/malloc_iterate_test.cpp b/tests/malloc_iterate_test.cpp
index 5e60a6d..76583eb 100644
--- a/tests/malloc_iterate_test.cpp
+++ b/tests/malloc_iterate_test.cpp
@@ -92,14 +92,15 @@
test_data->total_allocated_bytes = 0;
// Find all of the maps that are [anon:libc_malloc].
- ASSERT_TRUE(android::procinfo::ReadMapFile("/proc/self/maps",
- [&](uint64_t start, uint64_t end, uint16_t, uint64_t, const char* name) {
- if (std::string(name) == "[anon:libc_malloc]") {
- malloc_disable();
- malloc_iterate(start, end - start, SavePointers, test_data);
- malloc_enable();
- }
- }));
+ ASSERT_TRUE(android::procinfo::ReadMapFile(
+ "/proc/self/maps",
+ [&](uint64_t start, uint64_t end, uint16_t, uint64_t, ino_t, const char* name) {
+ if (std::string(name) == "[anon:libc_malloc]") {
+ malloc_disable();
+ malloc_iterate(start, end - start, SavePointers, test_data);
+ malloc_enable();
+ }
+ }));
for (size_t i = 0; i < test_data->allocs.size(); i++) {
EXPECT_EQ(1UL, test_data->allocs[i].count) << "Failed on size " << test_data->allocs[i].size;
@@ -180,14 +181,15 @@
TestDataType test_data = {};
// Find all of the maps that are not [anon:libc_malloc].
- ASSERT_TRUE(android::procinfo::ReadMapFile("/proc/self/maps",
- [&](uint64_t start, uint64_t end, uint16_t, uint64_t, const char* name) {
- if (std::string(name) != "[anon:libc_malloc]") {
- malloc_disable();
- malloc_iterate(start, end - start, SavePointers, &test_data);
- malloc_enable();
- }
- }));
+ ASSERT_TRUE(android::procinfo::ReadMapFile(
+ "/proc/self/maps",
+ [&](uint64_t start, uint64_t end, uint16_t, uint64_t, ino_t, const char* name) {
+ if (std::string(name) != "[anon:libc_malloc]") {
+ malloc_disable();
+ malloc_iterate(start, end - start, SavePointers, &test_data);
+ malloc_enable();
+ }
+ }));
ASSERT_EQ(0UL, test_data.total_allocated_bytes);
#else
diff --git a/tools/Android.mk b/tools/Android.mk
deleted file mode 100644
index 4dd66fe..0000000
--- a/tools/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2015 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)