Skip to content

Commit

Permalink
Create per-uid GCOV_PREFIX dir in the getenv wrapper am: 466d716
Browse files Browse the repository at this point in the history
Change-Id: I0aba1eed5198e4da8b770f3035a2ce0876a294e5
  • Loading branch information
android-build-merge-worker-robot committed Feb 3, 2020
2 parents e1da20f + 466d716 commit b47555d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions toolchain-extras/profile-globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>

// This file provides a wrapper for getenv that appends the userid (geteuid())
Expand All @@ -38,5 +39,6 @@ __attribute__((weak)) char *__wrap_getenv(const char *name) {
}

sprintf(modified_gcov_prefix, "%s/%u", __real_getenv(name), geteuid());
mkdir(modified_gcov_prefix, 0777);
return modified_gcov_prefix;
}

0 comments on commit b47555d

Please sign in to comment.