summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2020-10-16 02:36:54 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-10-16 02:36:54 +0000
commitdc10d6d7e97263b40682239416922708649ba91a (patch)
treeb9fd19839c2d613ca0935aad6bdecf2b1ab850b1
parentb3bcb9d3f4c5df8ff65c96a95ff8ce4f8b2b90aa (diff)
parentf63cfd97f362429af738ecb43583a646754c1f66 (diff)
downloadgtest_extras-dc10d6d7e97263b40682239416922708649ba91a.tar.gz
IsolateMain should default off under lldb too am: f63cfd97f3
Original change: https://android-review.googlesource.com/c/platform/system/testing/gtest_extras/+/1462707 Change-Id: I0fd55fe924eba8f4db41d6e349f393e21b50c0fc
-rw-r--r--IsolateMain.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/IsolateMain.cpp b/IsolateMain.cpp
index 898fb52..5b34ef5 100644
--- a/IsolateMain.cpp
+++ b/IsolateMain.cpp
@@ -97,7 +97,8 @@ static bool RunInIsolationMode(std::vector<const char*>& args) {
}
}
if (!isolation_forced) {
- // Check if we are running gdb/gdbserver. No need to be sneaky we are assuming no one is hiding.
+ // Check if we are running gdb/gdbserver/lldb/lldb-server. No need to be sneaky we are assuming
+ // no one is hiding.
pid_t ppid = getppid();
std::string exe_path = std::string("/proc/") + std::to_string(ppid) + "/exe";
char buf[PATH_MAX + 1];
@@ -110,7 +111,8 @@ static bool RunInIsolationMode(std::vector<const char*>& args) {
if ((len = TEMP_FAILURE_RETRY(readlink(exe_path.c_str(), buf, sizeof(buf) - 1))) > 0) {
buf[len] = '\0';
std::string_view file(basename(buf));
- return file != "gdb" && file != "gdbserver" && file != "gdbserver64" && file != "gdbserver32";
+ return file != "gdb" && file != "gdbserver" && file != "gdbserver64" &&
+ file != "gdbserver32" && file != "lldb" && file != "lldb-server";
}
// If we can't figure out what our parent was just assume we are fine to isolate.
}