gecko-dev/ipc
Gabriele Svelto a7c337103a Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright
This patch sets up a few different things that will be used by the WER runtime
exception module when it needs to notify the main process of a child process
crash.

For every child process we allocate a structure in the main process called
WindowsErrorReportingData that contains three things:
- The address of the function used to notify the main process that there's a
  pending minidump for a given child process
- The PID of said child process
- The name of the minidump that has been generated

The first field is filled up by the main process and will be read by the WER
process when running the runtime exception module, the second and third fields
on the other hand start empty and will be written into by the runtime exception
module after it has generated a minidump.

I know this sounds scary. It is. But bear with me please.

When we register the runtime exception module we can pass it a single
pointer-sized parameter but we need to pass it at least another pointer that
includes data coming from the child process itself (this one is called
InProcessWindowsErrorReportingData). This data currently includes only the
process type but will also include certain annotations in the future
(e.g. bug 1711418). So here's what we do: we store a pointer to the parent
data structure in the child process command-line (cringe) and we read it
from the runtime exception module by reading the crashed process command-line
arguments and parsing them (double-cringe).

Armed with this information the WER runtime exception module can populate
the info for the generated minidump and then push it into the main process
by calling CreateRemoteThread() (which creates a new thread in the main
process, triple-cringe at this point).

Differential Revision: https://phabricator.services.mozilla.com/D115379
2021-06-11 09:59:49 +00:00
..
app Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
chromium 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
contentproc Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
glue Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright 2021-06-11 09:59:49 +00:00
gtest Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
ipdl Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers 2021-05-21 15:46:46 +00:00
mscom Backed out 4 changesets (bug 1707954) for causing bc failures in ClearOnShutdown.cpp. 2021-06-10 09:13:45 +03:00
testshell Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8 2021-03-05 15:29:49 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
pull-chromium.py Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00