From 4fba28671b7213010dbfe6ad88e9891cc4080c75 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn <salyzyn@google.com> Date: Mon, 20 Apr 2015 10:27:38 -0700 Subject: logd: pidToName deficiency (Cherry pick from commit aa43ae2268076227e8b72ea095f8aeac439b3168) any logging in zygote permanently sets the pidToName Change-Id: I0b8fdc96fb5965a04d4dc4293c39815beef5eb8e --- logd/LogStatistics.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'logd') diff --git a/logd/LogStatistics.h b/logd/LogStatistics.h index a935c27..ca4b9a6 100644 --- a/logd/LogStatistics.h +++ b/logd/LogStatistics.h @@ -186,6 +186,10 @@ struct PidEntry : public EntryBaseDropped { const char*getName() const { return name; } inline void add(pid_t p) { + if (name && !strncmp(name, "zygote", 6)) { + free(name); + name = NULL; + } if (!name) { char *n = android::pidToName(p); if (n) { -- cgit v1.1