From 0d0f3164160e50ddb78022f662c5438fc167f50d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 10 May 2018 12:55:40 +0100 Subject: Handle multidex in LocationIsOnSystemFramework. bug: 79111915 Test: art_dex_file_loader_test.cc Change-Id: I507ad98c62b4c589196685d74abdeaf748502a61 --- libdexfile/dex/dex_file_loader.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libdexfile/dex/dex_file_loader.cc') diff --git a/libdexfile/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc index 1e0f5ac6ae..457addf114 100644 --- a/libdexfile/dex/dex_file_loader.cc +++ b/libdexfile/dex/dex_file_loader.cc @@ -191,6 +191,8 @@ std::string DexFileLoader::GetDexCanonicalLocation(const char* dex_location) { std::string base_location = GetBaseLocation(dex_location); const char* suffix = dex_location + base_location.size(); DCHECK(suffix[0] == 0 || suffix[0] == kMultiDexSeparator); + // Warning: Bionic implementation of realpath() allocates > 12KB on the stack. + // Do not run this code on a small stack, e.g. in signal handler. UniqueCPtr path(realpath(base_location.c_str(), nullptr)); if (path != nullptr && path.get() != base_location) { return std::string(path.get()) + suffix; -- cgit v1.2.3-59-g8ed1b