diff options
| author | 2018-05-11 12:19:20 +0000 | |
|---|---|---|
| committer | 2018-05-11 12:19:20 +0000 | |
| commit | 9d93cd6518633be803cc140b51d0ad5093fc25f2 (patch) | |
| tree | 8619f55be46f787e4347435f436ace283e8dbc06 /libdexfile/dex/dex_file_loader.cc | |
| parent | da1e6d2a8d41c130eefbb4ad3b828f2cd1470529 (diff) | |
| parent | 0d0f3164160e50ddb78022f662c5438fc167f50d (diff) | |
Merge "Handle multidex in LocationIsOnSystemFramework."
Diffstat (limited to 'libdexfile/dex/dex_file_loader.cc')
| -rw-r--r-- | libdexfile/dex/dex_file_loader.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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<const char[]> path(realpath(base_location.c_str(), nullptr)); if (path != nullptr && path.get() != base_location) { return std::string(path.get()) + suffix; |