gecko-dev/ipc/chromium
Jed Davis eb6fa5f6d7 Bug 1784567 - Mitigate the unsafety of the GCOV_CHILD_PREFIX support. r=nika
In code-coverage builds we have code which, after `fork` in the child
process, does a number of async-signal-unsafe operations which aren't
permitted in that context.  In particular, locking is a problem: if
another thread in the parent process had held the lock, it will deadlock.

Most of this is conditional on the `GCOV_CHILD_PREFIX` env var being
set, and currently we don't (see bug 1724239), but checking that env var
itself is a problem, because `PR_GetEnv` takes a mutex.  (This was found
by inspection, so I don't know if it's happening in practice, but it's
possible that mysterious timeouts on ccov builds might be caused by this
bug.)

Therefore, this patch moves reading the env var into the parent process,
where it's safe; the rest of the code still contains unsafe operations
(although our `pthread_atfork` hooks in mozjemalloc might help) but it
won't be run.

This will need further cleanup at some point; see bug 1783305.

Differential Revision: https://phabricator.services.mozilla.com/D154572
2022-08-22 18:01:27 +00:00
..
gtest Bug 1775148 - Cleanup ipc/ includes r=sylvestre 2022-06-23 15:49:57 +00:00
src Bug 1784567 - Mitigate the unsafety of the GCOV_CHILD_PREFIX support. r=nika 2022-08-22 18:01:27 +00:00
chromium-config.mozbuild Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
moz.build Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi 2021-12-23 20:29:07 +00:00