[coverage] Wrap calls to open
Bug: http://b/173448692
The coverage runtime creates files with uga+rw permissions but an
earlier umask call can restrict these and cause problems with profile
merging ('%Nm' in LLVM_PROFILE_FILE). This change adds a wrapper to
`open` which will set the permissions again using `fchmod` for files
opened under the /data/misc/trace directory.
Test: Manually validate permissions of files under /data/misc/trace.
Test: libprofile-clang-extras-test
Change-Id: Iee7fe07b4bfb362fe5146c962b54affaa55ef380
3 files changed