This adds a pipe going in the other direction (parent to child).
Initially, I didn’t think this was necessary, but it turned out to be
needed for ProcessReader. Having the child wait on a pipe read is the
easiest way to keep it alive until the parent is done with it.
This also tests MachMultiprocess::ChildPID() in
mach_multiprocess_test.cc.
Both of these fell out of https://codereview.chromium.org/491963002/.
TEST=util_test MachMultiprocess.MachMultiprocess
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/491363002
time_t is a typedef for long on Mac OS X. In 32-bit x86 (ILP32), long is
a signed 32-bit quantity, and its range does not contain the range of
uint32_t, used to store times in time_t fashion in minidump files. A
cast is necessary to make these EXPECT_* macros do the right thing. This
is not a problem in x86_64 (LP64) where long is a signed 64-bit
quantity, which does contain the range of uint32_t.
clang’s error was “error: comparison of integers of different signs:
'const long' and 'const unsigned int' [-Werror,-Wsign-compare]”
BUG=
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/491023005
InRangeCast<> is similar to base::saturated_cast<>, but it allows the
caller to specify the value to be returned in the event that the source
value can’t be converted to the destination data type without data loss.
TEST=util_test InRangeCast
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/467103002
This also adds MachErrorMessage(), a test-only function that’s a
dependency of TaskMemory’s test, and related test-only error message
functions.
TEST=util_test TaskMemory.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/438993002
MinidumpFileWriter writes the top-level object to a minidump file. This
consists of a MINIDUMP_HEADER and a list of MINIDUMP_DIRECTORY entries
that point to streams, which are second-level objects in minidump files.
This change also adds the base class for stream writers,
MinidumpStreamWriter.
TEST=minidump_test MinidumpFileWriter*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/432863006
The final range check needs to check that the value fits in a size_t,
because that’s what StringFileWriter uses for its offset_.
TEST=util_test StringFileWriter.SeekInvalid
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/434103003
compat includes headers providing definitions normally provided by the
system, in cases where the system SDK does not always provide the
correct or up-to-date definitions, and cases where code on different
platforms needs to access definitions normally only available on one
platform.
To provide definitions on a single platform, where the system SDK may
not provide the definitions correctly, use subdirectories named for the
platform, such as “mac”.
To provide definitions normally available on only one platform to
others, use subdirectories that identify that they are to be used on
platforms other than the one that originated their definitions, such as
“non_win”.
In all cases, headers should be named as they are natively in their
respective SDKs, so that it’s possible to #include them according to
their usual names.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/432843002
This commit contains the basic structure of the project:
- LICENSE and related files.
- DEPS to check dependencies out into third_party.
- README.crashpad files and .gyp files to accompany third_party
dependencies.
- Infrastructure to run GYP as a gclient hook.
- codereview.settings to enable Rietveld code review.
- Assorted other administrative and dot-files.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/426403002