In order to allow on-demand uploads for crash reports, adding a
upload_explicitly_requested bit on 'pending' state and necessary support
for it.
BUG=chromium:620762
Change-Id: Ida38e483fe8d0e48eb5cbe95e8b8bfd96a2f8f00
Reviewed-on: https://chromium-review.googlesource.com/367328
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This switches the default behaviour of crashpad_handler.exe to be a
/subsystem:windows app, so that normal usage won't cause a console to be
popped up. At the same time, creates a copy of crashpad_handler.exe in
the output dir named crashpad_handler.com. The .com doesn't affect
normal operation, as the way StartHandler() uses CreateProcess()
requires a real path to a file. However, when run from a command prompt,
.com are found before .exe, so editbin the .com to be to a console app,
which will be run in preference to the exe when run as just
"crashpad_handler", as one tends to do from a command prompt when
debugging. That is:
d:\src\crashpad\crashpad\out\Debug>where crashpad_handler
d:\src\crashpad\crashpad\out\Debug\crashpad_handler.com
d:\src\crashpad\crashpad\out\Debug\crashpad_handler.exe
d:\src\crashpad\crashpad\out\Debug>crashpad_handler --help
Usage: crashpad_handler [OPTION]...
...
d:\src\crashpad\crashpad\out\Debug>crashpad_handler.exe --help
<no output>
d:\src\crashpad\crashpad\out\Debug>crashpad_handler.com --help
Usage: crashpad_handler.com [OPTION]...
...
We also use the .com file in test invocations so that output streams
will be visible.
R=mark@chromium.org
Change-Id: I1a27f88472d491b2a1d76e63c45e6415d9f679c0
Reviewed-on: https://chromium-review.googlesource.com/371578
Reviewed-by: Mark Mentovai <mark@chromium.org>
When crashy_test_program's SomeCrashyFunction is inlined into
CrashyMain, cdb doesn't demangle the decorated form of an anonymous
namespace (?A0x12345678) into the expected `anonymous namespace' string.
I experienced this in Release_x64 and Release modes using MSVS 2015
update 3 (14.0.25420.1, cl 19.00.24213.1) and cdb versions 10.0.10240.9
and 10.0.14321.1024.
BUG=crashpad:129
Change-Id: I0a665b88891c271253adccd9b2b414fcaac26c8f
Reviewed-on: https://chromium-review.googlesource.com/368730
Reviewed-by: Scott Graham <scottmg@chromium.org>
The only thing relevant to Crashpad in the window is:
222bd42ce39d roll clang-format 242086:r258123
Change-Id: Ia175470c12f61ef4dac0e1417143d3cac9d16765
Reviewed-on: https://chromium-review.googlesource.com/368690
Reviewed-by: Scott Graham <scottmg@chromium.org>
30846f31c5e5 Fix typo in googlemock/README.md
a7964a3fbd41 Implement GetThreadCount for AIX
bf7e9e8c2bb3 Add include of sys/types.h
554ca00ff706 Update DevGuide.md
c81cf6b7efde Update .travis.yml
58b543535a57 Update .travis.yml
231af5ddc81a Try to use clang-3.6 in travis
c76f9e0cdd49 Update .travis.yml
e8193fe6e064 Adding llvm toolchain repo
b8f9b2b540d9 Update clang version
bbbc025d2e84 More docs in travis config
6705b9adeabc Override clang++ name on Linux only
4a0b77ff7253 Create CMakeLists.txt
98d988deac06 Add CMake install rules for gtest libraries and headers
c4c23548a19a Merge pull request #614 from DukeXar/master
884dd08d73d7 Merge pull request #628 from fjunqueira/patch-1
93c37d59b013 Merge pull request #632 from nocnokneo/add-cmake-install-
rules
f44190f2c432 Fix missing-field-initializers GCC/Clang warning (issue
433)
ffce1a857856 Merge pull request #633 from plopresti/master
3aef7d7ddd3a Update README URLs based on HTTP redirects
83b93eac3b2b Update FAQ.md
25409abfe7a3 Fixing some table error in file
ccd0f94e8217 Merge pull request #592 from Ferenc-/master
96bba4d5c1e9 Merge pull request #638 from KindDragon/patch-1
3c3a4ac2c2fa Merge pull request #640 from Ali-Se/patch-2
6fe019e6b73e Merge pull request #607 from google/BillyDonahue-patch-1
2f93e2d8085e Merge pull request #636 from ReadmeCritic/master
16b9bbc3efb1 Fix AdvancedGuide link in FAQ.md
1f8fe13618a5 Merge pull request #647 from mithro/patch-1
7c8ac4886a7a Added CMake install rules for GMock
ebd1d0887cdb Fix link to FAQ in Primer.md
35fb11efbe1a Merge pull request #654 from cmorse/doc_fix
f601ee162e23 Add include dirs to targets if CMake version supports it
a470862dbe80 fixed link in googlemock documentation
57b376a9cb8b Merge pull request #660 from waynix/FixLinks
c1cd9c2b05d5 Merge pull request #650 from jpuigcerver/master
0162ff72e80e Merge pull request #657 from
audiofanatic/issue655-targetHeaderDeps
ddb8012eb48b Merge pull request #602 from mtbrandy/threadcount_aix
ac35fe735984 Update GTEST_PROJECT_URL_ in internal/gtest-port.h
13206d6f53aa Merge pull request #670 from dawikur/master
d8df1fb4884c Add link to Google Test Primer docs in README.md
d404af0d987a add python 3 support to tests
456fc2b5c4e9 add python 3 support to fuse_gtest_files script
82b11b8cfcca Merge pull request #678 from pjaytycy/master
340c6b337518 Add tmux and tmux-256color to the colored terminal list
a9b73f8139a9 Merge pull request #699 from achimnol/master
ff5ffd457e03 Merge pull request #688 from tamland/python3
f364e188372e Change error message of EXPECT_EQ to treat lhs and rhs
equivalently
b648a3072161 Add build artifacts to git ignore
d4aa34b05d72 Fix link that's returned when running tests. #714
f5acf22268d6 Merge pull request #716 from jacob-
meacham/feature/gitignore
5909d44d348f Merge pull request #715 from jacob-meacham/bugfix/expect-
call
77d6b1733803 Merge pull request #713 from DarthGandalf/expect
83d3b47acf8a Fix formatting in AdvancedGuide.md
ff07a5de0e81 Merge pull request #719 from paul-
wilkinson/docs_formatting_fix
d6790f26cae2 Read Bazel's $XML_OUTPUT_FILE environment variable
12b2f23e8e6b Fix inconsistent style
5db9cbbc2332 Restructure $XML_OUTPUT_FILE logic
6991f422b65a Fix env_var_test to ignore XML_OUTPUT_FILE if already set
d23cf2b15701 Restructure test so each scenario is independent
62700bdf5689 Fixed typo ('XCode' -> 'Xcode')
f7248d80eae1 Merge pull request #731 from mattrajca/patch-1
0098be394ad5 Fix typo (Inovke -> Invoke)
eba179631078 Merge pull request #735 from phad/patch-1
72416fab75f0 Merge pull request #724 from duggelz/master
207147495c80 Fix whitespace in paragraph
d225acc90bc3 Merge pull request #741 from mbinna/patch-1
2746b57f78a0 Changed the GTestDir marco value to reflect the new dir of
googletest
01f3d09f9f6c Updated the value of GTEST_DIR to reflect the googletest
dir
5bae126d663e Added VS 2015 project support
0a439623f75c Merge pull request #773 from mazong1123/master
e35015f53904 fix to operator precedence in GTEST_TEST_BOOLEAN_ with
expressions that implement operator bool
2489c3074748 Fix to tests that return object which implement operator
bool
faee7d1fbcf1 Merge pull request #808 from djmott/master
ce7ec96edab7 Rollback change #808
10799abad25a Merge pull request #810 from google/rollback_808
43c0ae337536 Support running MSVC build on AppVeyour
81345850725f Merge pull request #723 from KindDragon/master
e51026e5d15e Add Appveyor badge to Readme.md
d406cb18c3d7 Merge pull request #814 from google/BillyDonahue-patch-2
531bf5c41071 Fixed issue #775
dc2dbf1fbf1d Reformatted the Unprintable operator== code style
ec44c6c1675c Merge pull request #821 from mazong1123/master
Change-Id: I40169adab6ea260334089b08bf4a51d4a65d6e08
Reviewed-on: https://chromium-review.googlesource.com/368680
Reviewed-by: Scott Graham <scottmg@chromium.org>
The utilities in base/stl_util.h have been moved from the global
into the base namespace. This patch updates the call sites accordingly.
No functional changes.
Change-Id: I059d5d6299f947b1135672da170427d23ac4775e
Reviewed-on: https://chromium-review.googlesource.com/368640
Reviewed-by: Mark Mentovai <mark@chromium.org>
There’s no behavior change, but two variables that store quantities in
units of Hz were misnamed *_mhz.
Change-Id: I8b7d9576a7638a4ee9789dc9d1050009ac009696
Reviewed-on: https://chromium-review.googlesource.com/368080
Reviewed-by: Scott Graham <scottmg@chromium.org>
7904ce96fd01 Make the ninja generator handle symlinked paths correctly
741b7f1d257b Add support for a CPPFLAGS_host environment variable, and
update the cflags test to verify it
265f495cc3a3 Fix infinite loop on empty variable name
c3d861c8bca4 ninja win: Suppress noisy messages from link.exe when LTCG
is enabled
8f3918d7408f Promote documents in md-pages branch
b3cef028a51a AIX's cp command does not support -af which is the default,
so use -RPf which achives something similar
427a0406159c Adding framework path mapping for 'copies' action in gyp
files
3f21260b4340 Change analyzer to search for build_targets from supplied
targets
e2e928bacd07 Add support for Xcode LastUpgradeCheck project attributes,
allowing suppression of Xcode project configuration
warnings
68f268008844 Add support for kernel-extensions in GYP
ae2d73840216 Set optional LastSwiftUpdateCheck to Xcode project
attributes
f2c3cfc3b1df win: Fix missing loadable_module dependency in ULDI mode
2c1e6cced235 Revert of e2e928bacd07
0f5bae131e58 Change CMAKE_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR
2dd620e10329 Attempt again to upstream Xcode project version warning
suppression, from 1416453003 and 1430573009, and rolled
back in 1423583004
f54bd199e717 Adds back lookup of 'all' targets
70fa8bbeb292 Changes semantics of analyzer
33b351b2eda8 Fix bug in analyze were empty invalid_targets was
incorrectly written
e1133480da78 Changes analyzer to include test_targets in compile_targets
f06a5a0e46ce Remove deprecated code path from analyzer.py
567d084f2cb1 Add support for NetBSD (OS = netbsd)
c385ad654b30 Copy files with `cp -pPRf` on OpenBSD
f4d65e35719c Generate response files out of the source tree with xcode &
xcode-ninja
e2313c02ad7b Fix CalculateGeneratorInputInfo for "xcode-ninja" generator
6fb8bd829f0c Derive default for ar_host from ar
70ee80e82bac Error checking to clarify SYSTEMROOT errors
863d9a4f4119 Make ninja work with XCTests for iOS
b85ad3e578da ninja: Correctly handle copies steps in sourceless
shared_library targets
b362bbfbc877 mac: Extend libtool filter to also match fat builds
2b086540aeed Peter Kasting <pkasting@chromium.org>
4ff48eb18307 Switch the dependencies to their Git mirror
54b7dfc03f74 mac ninja&make: Use xcrun instead of xcodebuild where
possible
9e2ceaef5352 GYP: Make GYP build deterministic
6f83895e9622 Stop copying deprecated ResourceRules.plist
aa0301be5a24 Allow converting resource plists to binary
87ac4d0e63fc Add limited support for Mac to CMake generator
7ab6f482e87a [iOS] Preserve global symbols when calling strip (-x) on
today extensions
32cb1709adc3 Add timestamp=none to codesign flags
57190fa27868 [iOS] Update today_extension link flags
18ce4ecf6cf2 [iOS] Set --auto-activate-custom-fonts for ibtool compile
a230124f3834 Avoid gyp_chromium failures when vcvarsall.bat was run
66bbdf4c6b45 Revert "[iOS] Set --auto-activate-custom-fonts for ibtool
compile."
5170bfd38fe7 [Mac/iOS] Add custom fonts, target device and minimum
deployment target to _CopyXIBFile
51383232066a Update Xcode emulation extra plist items
7d29c3de1f5e Revert "Update Xcode emulation extra plist items."
b25bbc1f942d Re-land update Xcode emulation extra plist items for Xcode
7.2
2f9ffdc96135 Support sdk_version of None
ed163ce233f7 Don't recompute environment for mac bundles unnecessarily
0cd47bf6960e Make login.keychain and 'Provisioning Profiles' symlinks
d84fed246cd4 Fix tests with Xcode 7
1950f6761bdf Xcode-ninja: Add excluded files to the project
sources_for_indexing.xcodeproj
61259d585ce9 ninja/win: Use qualified paths for precompiled headers
5874a3cf9bac Adjust pretty_gyp to align comments with the appropriate
braces
fbcb317c7513 ninja: Add target_rpath generator flag
133eaf70b372 Add support for iOS Frameworks with header maps
8e8c3178d9d2 Detect and warn on missing vcvarsall.bat
28340b46df65 Support DEVELOPER_DIR in gyp-ninja for mac
3fa0c6038873 [GN] Use hard-link if possible when copying to bundle
697933c2e3b3 Fix mac_tool.py copy-bundle-resource errors
4ec6c4e3a94b [iOS/OS X] Copy file instead of hard-linking them
f9ac7a9ba1c4 gyp-win-tool: Let LinkWrapper only transmogrify / when the
host platform is Windows
34d3fba9d167 gyp-win-tool: Fix regression from my last change
6ea68631cdab gyp-win-tool: Don't use shell=True on non-Windows hosts
db72e9fcf55b Fix header map nextPowerOf2 method
4cf07e8d6167 [ios-ninja] Support xctests in devices in release
e24c83726b72 Adds support for a new target spec: 'mac_xcuitest_bundle'
This allows us to create UI testing bundles
02b145a1a4f4 Enabling /ZW (CompileAsWinRT) option for msvs
bce1c7793010 ninja/mac: Add horrible workaround for horrible Xcode 7.3
ld bug
c61b0b35c839 [gyp-ninja] Set simulator and device SDKROOT for iOS
35eafcd93951 Ignore more Xcode stderr logging information
bac4680ec9a5 Only call CopyStringsFile if convert_to_binary is False
e7079f0e0e14 Fix :rfc1034identifier when the value contains underscore
1f989f652a30 Complete PBXCopyFilesBuildPhase TODO in xcodeproj_file.py
93cc6e2c23e4 Make the ninja backend transitively check for C++ sources
to use the C++ compiler for linking
Change-Id: Ifdb705cee07aa0d158b9b1952875041d9f2a14e5
Reviewed-on: https://chromium-review.googlesource.com/367490
Reviewed-by: Scott Graham <scottmg@chromium.org>
09f74a2cf068 Import StringPieceHash from chromium
9c5463b4d4b3 mac: Use Unified Logging when the deployment target is
10.12 or higher
Change-Id: I2675f07f3e136dfcc2948928543bd2bff07809ea
Reviewed-on: https://chromium-review.googlesource.com/366780
Reviewed-by: Scott Graham <scottmg@chromium.org>
HTTPBodyStream::GetBytesBuffer returns negative number on error.
Change-Id: I9958fb35d65e894067d71e8f37c30ff8948cd90d
Reviewed-on: https://chromium-review.googlesource.com/366360
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
In 10.12, dyld calls abort_with_payload() on fatal error from
dyld::halt(). In previous 10.12 betas, abort_with_payload() caused the
process to appear to terminate as exit(1). This was weird, so I filed
https://openradar.appspot.com/26894758. In 10.12db4 16A270f, Apple seems
to have fixed this bug. abort_with_payload() as used by dyld now causes
the process to appear to terminate as abort() as I had requested.
A Crashpad test that assures Crashpad’s ability to catch dyld crashes
needs its expectations updated with each change to a process’ apparent
termination code. It’s updated to expect SIGABRT on 10.12 or later. No
concessions are made for previous 10.12 betas or their buggy exit(1)
behavior. Nobody should be running any 10.12 beta prior to 10.12db4
16A270f now or at any point in the future.
This undoes (redoes) 335ef494677f.
BUG=crashpad:120
TEST=crashpad_snapshot_test MachOImageAnnotationsReader.CrashDyld
Change-Id: I13b330ac83fc9b33907ac172d35983974b8910f0
Reviewed-on: https://chromium-review.googlesource.com/365920
Reviewed-by: Robert Sesek <rsesek@chromium.org>
The layout of dyld_all_image_infos changed slightly in 10.12db3 16A254g
and Xcode 8b3 8S174q.
BUG=crashpad:120
TEST=crashpad_snapshot_test ProcessTypes.DyldImagesSelf
Change-Id: I66fb60c80b26f465913f5100a8c40564723b0021
Reviewed-on: https://chromium-review.googlesource.com/361800
Reviewed-by: Robert Sesek <rsesek@chromium.org>
exit(1) is a weird code for this, so I filed
https://openradar.appspot.com/26894758.
This doesn’t completely fix bug crashpad:121 unless both
crashpad_snapshot_test and crashpad_snapshot_test_no_op are signed with
the same Developer ID certificate. I’m hoping to get some action on
https://openradar.appspot.com/26902656, which will enable a complete fix
for this bug in unsigned developer builds. It would be unusual to have
to sign test executables.
BUG=crashpad:120,crashpad:121
TEST=crashpad_snapshot_test MachOImageAnnotationsReader.CrashDyld
Change-Id: I54fdfaa9178029b91ea3cbc12f2760dfa5124858
Reviewed-on: https://chromium-review.googlesource.com/355260
Reviewed-by: Robert Sesek <rsesek@chromium.org>
RESOURCE_TYPE_IO always appears to be non-fatal based on disassembly of
the function responsible for sending it in xnu 3705.0.0.1.10 (10.12dp1
16A201w).
BUG=crashpad:120,crashpad:124
Change-Id: I9dcc6673f922cbd7af910b76991825a9d9c96fe6
Reviewed-on: https://chromium-review.googlesource.com/355250
Reviewed-by: Robert Sesek <rsesek@chromium.org>
When reason is mistaken for reason_, things can get unreasonable.
Change-Id: I3deff343fd6836eba3111ba7551174591c2bf5bc
Reviewed-on: https://chromium-review.googlesource.com/354101
Reviewed-by: Robert Sesek <rsesek@chromium.org>
_NSGetExecutablePath() returns a buffer size including space for the
trailing NUL byte. A std::string’s length should be one less than this,
because the std::string’s length does not include the trailing NUL byte
that is guaranteed to be present.
Change-Id: I46b8a68979beda7dc5de09d0eef6f1d3d6a78ecf
Reviewed-on: https://chromium-review.googlesource.com/354100
Reviewed-by: Robert Sesek <rsesek@chromium.org>
The Mach-O reader validated segment and section file offsets by checking
that they were relative to the same base, insisting that a section’s
file offset be the same distance from a segment’s file offset as the
section’s preferred load address was from the segment’s preferred load
address. Notably, these file offsets already could not be validated
against the Mach-O image’s start because in the dyld shared cache, for
all segments other than __TEXT, these offsets were relative to the dyld
shared cache’s start.
In 10.12dp1 16A201w, file offsets for sections in the __TEXT segment are
also relative to the dyld shared cache’s start, but the file offset for
the __TEXT segment itself is relative to the Mach-O image’s start. Being
relative to different positions breaks Crashpad’s sanity check of the
module data. https://openradar.appspot.com/26864860 is filed for the use
of distinct bases in what should be related file offset fields.
While it would be possible with a bit of work to identify modules within
the dyld shared cache and adjust expectations accordingly, in reality,
these file offset values were only used to verify that the Mach-O
module.
In addition, the file offsets stored within the Mach-O file for sections
are 32-bit quantities, even in 64-bit images. It is possible to create a
large image whose section offset values have overflowed, and in these
cases, the offset value verification would also fail.
For these reasons, all file offset value validation is removed from the
Mach-O image reader.
BUG=crashpad:118, crashpad:120
Change-Id: I9c4bcc5fd0aeceef3bc8a43e5a8651735852d87b
Reviewed-on: https://chromium-review.googlesource.com/353631
Reviewed-by: Robert Sesek <rsesek@chromium.org>
The desired work count must be set before the thread is started,
otherwise multiple work items might be completed before it is set,
resulting it never signalling the sema.
R=mark@chromium.org,rsesek@chromium.org
BUG=crashpad:115
Change-Id: Ie4712f56af073277366cb84cca6d302a9eab409a
Reviewed-on: https://chromium-review.googlesource.com/346193
Reviewed-by: Mark Mentovai <mark@chromium.org>
d:\src\crashpad\crashpad>git checkout origin/master
Note: checking out 'origin/master'.
...
HEAD is now at f497e54... win: Fix indirectly gathered memory cap
[f497e54...]d:\src\crashpad\crashpad>ninja -C out\Debug
ninja: Entering directory `out\Debug'
[0->23/23 ~0] STAMP obj\All.actions_depends.stamp
[f497e54...]d:\src\crashpad\crashpad>tim out\Debug\crashpad_snapshot_test --gtest_filter=ProcessSnapshotTest.CrashpadInfoChild
Running main() from gtest_main.cc
Note: Google Test filter = ProcessSnapshotTest.CrashpadInfoChild
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ProcessSnapshotTest
[ RUN ] ProcessSnapshotTest.CrashpadInfoChild
[ OK ] ProcessSnapshotTest.CrashpadInfoChild (147879 ms)
[----------] 1 test from ProcessSnapshotTest (147880 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (147884 ms total)
[ PASSED ] 1 test.
real: 2m27.907s
qpc: 147914874us
[f497e54...]d:\src\crashpad\crashpad>git checkout slow-debug
Previous HEAD position was f497e54... win: Fix indirectly gathered memory cap
Switched to branch 'slow-debug'
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
[slow-debug]d:\src\crashpad\crashpad>ninja -C out\Debug
ninja: Entering directory `out\Debug'
[0->23/23 ~0] STAMP obj\All.actions_depends.stamp
[slow-debug]d:\src\crashpad\crashpad>tim out\Debug\crashpad_snapshot_test --gtest_filter=ProcessSnapshotTest.CrashpadInfoChild
Running main() from gtest_main.cc
Note: Google Test filter = ProcessSnapshotTest.CrashpadInfoChild
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ProcessSnapshotTest
[ RUN ] ProcessSnapshotTest.CrashpadInfoChild
[ OK ] ProcessSnapshotTest.CrashpadInfoChild (4414 ms)
[----------] 1 test from ProcessSnapshotTest (4416 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (4420 ms total)
[ PASSED ] 1 test.
real: 0m4.453s
qpc: 4454559us
R=mark@chromium.org
BUG=crashpad:114
Change-Id: I9f18fe54a2711a483ced86ece0b261cdfffc6192
Reviewed-on: https://chromium-review.googlesource.com/346490
Reviewed-by: Mark Mentovai <mark@chromium.org>
The limit was being reset per-thread, which isn't how it was intended or
documented. Add test to confirm the limit is more-or-less respected.
R=mark@chromium.org
BUG=crashpad:111
Change-Id: Ifae9f1ce2afcc2d6c6832db46f9b5c36adb35b42
Reviewed-on: https://chromium-review.googlesource.com/346131
Reviewed-by: Mark Mentovai <mark@chromium.org>
Because DumpAndCrashTargetProcess() suspends the process, the thread
suspend count is one too high for all threads other than the injection
one in the thread snapshots. Compensate for this when we detect this
type of exception.
BUG=crashpad:103
Change-Id: Ib77112fddf5324fc0e43f598604e56f77d67ff54
Reviewed-on: https://chromium-review.googlesource.com/340372
Reviewed-by: Mark Mentovai <mark@chromium.org>
783fdf3c: Add base::debug::Alias from Chromium base
Change-Id: Ibd2347cd35b09b171b355e5671c47df62e413534
Reviewed-on: https://chromium-review.googlesource.com/340259
Reviewed-by: Mark Mentovai <mark@chromium.org>
Adds a new client API which allows causing an exception in another
process. This is accomplished by injecting a thread that calls
RaiseException(). A special exception code is used that indicates to the
handler that the exception arguments contain a thread id and exception
code, which are in turn used to fabricate an exception record. This is
so that the API can allow the client to "blame" a particular thread in
the target process.
The target process must also be a registered Crashpad client, as the
normal exception mechanism is used to handle the exception.
The injection of a thread is used instead of DebugBreakProcess() which
does not cause the UnhandledExceptionFilter() to be executed.
NtCreateThreadEx() is used in lieu of CreateRemoteThread() as it allows
passing of a flag which avoids calling DllMain()s. This is necessary to
allow thread creation to succeed even when the target process is
deadlocked on the loader lock.
BUG=crashpad:103
Change-Id: I797007bd2b1e3416afe3f37a6566c0cdb259b106
Reviewed-on: https://chromium-review.googlesource.com/339263
Reviewed-by: Mark Mentovai <mark@chromium.org>
Add a user-configurable cap on the amount of memory that is gathered by
dereferencing thread stacks. (SyzyAsan stores a tremendously large
number of pointers on the stack, so the dumps were ending up in the ~25M
range.)
Also reduce the range around pointers somewhat.
Change-Id: I6bce57d86bd2f6a796e1580c530909e089ec00ed
Reviewed-on: https://chromium-review.googlesource.com/338463
Reviewed-by: Mark Mentovai <mark@chromium.org>
One possible cause for this would be a register "pointing" to the edge of an
inaccessible range. Having these zero-sized ranges doesn't break the minidump,
but it causes a warning when opening in windbg.
Also drop user-supplied zero-length memory ranges for the same reason.
BUG=crashpad:104
Change-Id: I2c5acc54f04fb617806cecd87ac4ad5db93f3db8
Reviewed-on: https://chromium-review.googlesource.com/339210
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
In debug builds, the extra memory is sometimes getting captured
(probably by a stale stack pointer), so disable this test for now to
un-red the bots. We can probably fix it by moving this one test to a
separate binary (or perhaps just removing it, I'm not sure it's that
useful anyway above and beyond the unit test.)
R=mark@chromium.org
BUG=crashpad:101
Change-Id: I98a58a467fb4a4d9f84d2e0d020a031a0ea9743c
Reviewed-on: https://chromium-review.googlesource.com/334821
Reviewed-by: Scott Graham <scottmg@chromium.org>
Forgot some u number suffixes.
BUG=crashpad:94
Change-Id: I2a3b47b4eab07bf5b9ced3859f5a8b388a840b35
Reviewed-on: https://chromium-review.googlesource.com/329760
Reviewed-by: Robert Sesek <rsesek@chromium.org>