This picks up 3½ years of changes, but 4ff48eb18307 is really what’s
needed to un-break “gclient sync” in Breakpad.
e16906f6a2db android: Add support for multiarch builds
d49e6fec9631 Adds xcode-ninja flavor for Xcode wrapper projects
a336035b6d4e Avoid duplicating non-configuration settings when merging
configurations
4e05c3342e09 Revert "Fix None target type with Ninja build."
d4779eb1916a Use context manager to manage OS environment in tests
5a8a04430afd Add MASM settings support to msvs_settings
9a184eea4849 Make test/cxxflags use a user define instead of
__OPTIMIZE__
56a70c5641bb gyp: use all processors instead of hard-coded 8
5fd7ce16426b gyp: 1% faster by optimizing IsPathSections
bf9a0ad1a214 gyp: fix O(n^2) in dependency calculations
1cd602be60dd gyp: use a set() in DeepDependencies for less O(n^2)
dc866c743496 gyp: cache conditional ASTs for 3 CPU seconds (5%) gain
aec8079bd717 Remove the default setting for clcompile_cmd in msvs-ninja
1fa63533989a win: disable two flaky tests on gyp-win32
b5dd37303a71 Show ASM output file instead of input file, just like CC
and CXX. R=scottmg@chromium.org
8929839ae384 gyp: avoid copying items that will be deleted
6d8eda691886 gyp: isinstance -> type for another 1-5% save
9f14141afe73 gyp performance: Another fixed O(n^2) in dependency calcs
f983231492d1 Test handling of empty RULE_INPUT_DIRNAME and fix this on
android
09af1810a11f 1-5% faster gyp: Use a simpler deepcopy
4e6d425104c2 gyp: Optimize IsStrCanonicalNumber for common case
fc1e3d52ccc5 android: only emit multilib variables for target builds
152521d7f307 Revert "gyp: use all processors instead of hard-coded 8."
c2f33dbfd5b1 Append src path to compiler path retrieved from build
configuration
11b270c9c7d5 Make the command cache use the directory name as part of
the cache key
03c3c47fb42e Add xcode_ninja_target_pattern to xcode-ninja generator
63de31e166cc Silence pylint for the imported OrderedSet class
6e8e8eb49ad1 Prefer MSVS 2013 over MSVS 2010
147a8aebd6cc Remove pylintrc and enable pylint checks for the Xcode
generator
54538a15d434 android: set GYP_VAR_PREFIX as a local variable in
actions/rules
1a622e23d0c3 ninja/mac: Update libtool noise filter for Xcode 5
9acbe0c6f78a Don't exclude sources for 'none' targets
3efe68d8cf67 Fix link step when specifying CLANG_CXX_LIBRARY
a981c9389d12 ninja win: filter 64 bit idl processing, and confirm in
test
dbcdbde823d2 Fix for some rules not being run if their trigger is also
an action dependency
482fd5de5c82 Use relative path/dir msbuild variables to map $(InputDir)
and $(InputPath)
fb36c3fe0124 msvs: Revert r1920 and add a test for excluded idl
11e243c9fd62 Fix msvs-ninja OutputDirectory path
0ff4e1aa1964 android: Handle inputs with spaces inside make functions
41f4de6e6db4 gyp: use all processors instead of hard-coded 8
23d664144f92 Fix msvs-ninja clean build command / target
3917682a16d5 Add option for link concurrency
018065bdc1a6 Add unittest for 'AR' in 'make_global_settings'
0c9a7aa9446f Override the user's language settings during tests
e97dbe88f23b ninja win: Remove obsolete comment, and make sure cc/cxx
are always overridden
f6d25e9ca24a Use context manager to manage OS environment in tests
f9242383d34e Teach Ninja generator about 'AR' in 'make_global_settings'
5a0658e560c0 First crack at adding a GYP_GENERATOR for determining
various things
133926d7f47e Add unittest for 'LD' in 'make_global_settings'
822a998ac082 Remove unused parameters from test code
466a82eba30e Revise unittest for 'LD' in 'make_global_settings'
e35391e5b016 Revise unittest for 'AR' in 'make_global_settings'
4d45bd7473c8 Teach Ninja generator about 'LD'/'LD.host' specified in
'make_global_settings_ld'
8746d8100e41 Teach Ninja generator about 'AR.host' specified in
'make_global_settings'
dacdd3802559 [gyp][Android] Implement
TestGypAndroid.run_built_executable
63a1f78eb0ec ninja: Pass .so files outside of --start-group/--end-group
c5c01bbc72f4 msvs: ensure that failing actions make the build fail with
multiple actions
796b58cddb84 Makes analyzer strip off a leading path separator
1c4be478a439 Introduce '--no-duplicate-basename-check' option to disable
the check of duplicate basenames
867a23f4b596 Xcode: Add xcdatamodeld = wrapper.xcdatamodeld in
extension_map
d1e5ccaf05ba Fixes two bugs in analyzer
80e01de623ed Fixes bug in path handling of analyzer
b886dac6179e Add test files for
https://codereview.chromium.org/406523005/
39fd3e8ea1c8 ninja/win: Put common msvs_system_include_dirs into
%INCLUDE%
f536bafefff9 This CL adds support for extension in GYP
a48744759a8a ninja: Add support for 'ninja_use_console' in actions/rules
b95cbeb2b4a5 Changes analyzer to search for targets
cb818ae005d8 Enable custom suffixes for Mac bundles
39bb8956231c Avoid infinite recursion with identity variables
ac2684beed6e Updates analyzer to output to a file
cd5d655d509f Guard against configurations without 'xcode_settings'
6bd80e4bba1e Pull in relevant targets when using xcode-ninja
93303ec2a58c Currently I've special cased gyp* file modifications higher
in the stack. By that I mean if a gyp* file has been
modified I don't run analyze and assume everything has
changed. This change adds support for modification to gyp*
files. If a gyp* file has changed it assumes all targets in
the file are modified. Similarly if an included file has
been modified all targets in the file that did the include
are considered modified. Lastly, if one of the modified
files is specified on the command line via -I the I early
out and assume everything needs to be recompiled
474e6f6c6772 Style changes for analyzer __ -> _ and lots of single
newlines to double newlines
ed274e3ea588 Provide a way to suppress implicit MIDL generation rules
for actions
8432ec2cc86f Removes old way to specify files to look for
ce177a087448 Makes the analyzer output the set of targets needing a
build
b38e5f2f93fa ninja win: don't expect pdb to be generated when
GenerateDebugInformation: false
07465a390fff android: Make buildbot able to use a custom manifest
fa401a9913d3 Makes analyzer output names of all executable target types
43a3b907eb20 android: Support host multilib builds
02717b7ddda2 Support for custom NM/readelf binaries in your toolchain
6760f5b1a485 Makes matching of build files work when absolute
1ff523f4eccd Changes the ninja generator to output phony targets for
uninteresting targets
94b57d39a88c Changes ninja generator to only output empty names if not
already output
80a221d3ac20 Fix indentation for emacs and add missing keyword
911f177ec4ce android: Don't emit useless info into generated makefiles
46282cedf40f android: Add a way to override build system variables
ce6c5076aa98 Don't return unfound VS version, raise instead
0eedec84850c Don't run windows tests on other platforms
c5aaab5e438b Adds swift file support to xcode generation
397b1c684b0b I need this change to create Windows 8.1/Windows Phone 8.1
projects that compile modules that can be consumed by
Windows Store Applications (WinRT)
d77f8ea48f8c Revert r1978 and r1979
825a7599122b Revert "I need this change to create Windows 8.1/Windows
Phone 8.1 projects that compile modules that can be
consumed by Windows Store Applications (WinRT)."
0f464a10fcfd ninja win: Add support for 'CallingConvention'
f79c48344324 Added msvs_enable_winrt to enable creating Windows Store
compatible projects for .dlls that are consumed by WinRT
applications
05c509393b3f Add support for MIDL include directories
55e3f25dfe2a ninja: Don't rerun actions/rules based on where gyp was
invoked
2be082cb9513 Add Ninja support for MSVS $(TargetExt), $(TargetFileName)
and $(TargetPath) macros
9e65902d3601 gypd: update with required default variables
9202573e476f android: Build against NDK prebuilts, not system libraries
a61e86088492 Add (partial) support for assets catalog
a79c3560865f Simplify and optimize FindCycles
540e4b1e665a Stop checking for duplicate basenames
b13d8f243da1 Moves warning about invalid targets into 'invalid_targets'
in result
a83e5acab1a8 Add indentation offset guess for gyp emacs mode
723d919ae70c Switch to 2013 now that it's what's on the bots
f491c0b3aae9 msvs: Fix rule dependencies for VS2013
487c0b6ae8b4 Set ZERO_AR_DATE=1 when running libtool
cb9f256d75f5 ninja win: Don't return unfound VS version, raise instead
9c58d52d6b6c Fix dependency broken on mac when building FAT binaries
f1c42f73e4cc Revert r1998, it breaks iOS builds
addc5ea33ab3 win: Use the _winreg module for registry access
0131edea33bb ninja win: Add msvs emulation for FloatingPointModel
fb8a7bd65062 Add support for "else if" in gyp conditions
66b3c809f3d9 Mechanical changes to cleanup pylint presubmit checks
acf3295fe144 Add back support for /Gv now that gyp-win64 has VS2013
4621f4d44814 Initialize struct flock for AIX with O_LARGEFILE used by
Python
0a381c067483 ninja/win: Let link-wrapper convert /s to \s in the linker
command
fe00999dfaee android: don't try to handle suppress_wildcard
fa59ed0b9a01 Fixed Gyp Xcode generator for libraries with identical
names
d75685990507 Cache data for included files in the multiprocess load
codepath
ce7a555f1c58 win: Add support for VS2015
201a8c83eb33 Add support for iOS WatchKit apps in GYP
32ca1cd8e010 Add support for generating an Eclipse .classpath file
8c31354f5e0c Fix mixed line endings warning
4f4c7cb5a63e Add TestGypXcodeNinja to run tests against the xcode-ninja
generator
f1dc682b70a6 Fix: xcode-ninja should generate Xcode workspace into
generator_output
cdf037c1edc0 Fix: xcode-ninja should copy the product extension to the
wrapper project
82b08049cc0b Set ZERO_AR_DATE=1 when running libtool
8b69f7d23df5 Add support for generating an Eclipse .classpath file (bug
fix)
789a019a8320 Don't serialize linking for the make generator by default
194ec65a55ed Revert 2011 'Fixed Gyp Xcode generator for libraries with
identical names.'
91a89564da3d Add 'depfile' option to actions
3dde7bfb50a6 don't assume bash is installed
28384e55a5c8 msvs/ninja win: Fix support for
ImageHasSafeExceptionHandlers
adb7d24b9fc1 Revert "msvs/ninja win: Fix support for
ImageHasSafeExceptionHandlers"
b28bd7ddd143 win: 'EnableEnhancedInstructionSet': '5' now enables
/arch:AVX2
104e21ecf6f2 mac: Followup to ZERO_AR_DATE, touch the -o archive, rather
than expecting only one
4d7c139b1820 win: Add NoImportLibrary flag for ninja generator
67000714d51e Reland "msvs/ninja win: Fix support for
ImageHasSafeExceptionHandlers"
16f9f4566f5d msvs: Prefer x64 toolset if we are running on 64-bit
6194e32f7fcb Make msvs-ninja work for target-arch=x64
34640080d08a ninja/posix: Introduce support for arflags variable
7cd601835636 Updating gyp repo for git, preparing for cq
dd831fd86e7a Fix script url
a5bd08f28629 Adds the ability for 'copies' in Xcode project files to
specify the 'Code Sign on Copy' option
002ebe4420a3 Fixed version of https://codereview.chromium.org/748793002
50ab31edc847 Fix typo in ternary operator
4a9b712d5cb4 Fix gyp analyzer generator on mac
d9823985797f Convert plist and strings to binary for iOS
28c00336a403 Bump Xcode compatibility version from 45 (Xcode 2.4-3.1) to
46 (Xcode 3.2)
2cd9d0633c96 [ninja-xcode] Include action inputs in hybrid builds
d174d75bf69c Export generator flavor to gyp scripts
2b44e5987d5a Add missing identity variables to gypd generator
e1c8fcf74b68 Assert when source is an absolute path
c5859a298166 Migrate GYP docs over from the wiki
69dfb493a22f LLVM_LTO support for make / ninja
2889664b9fa8 Address scottmg comments from
https://codereview.chromium.org/1003273007/
2a5511bd901f Improve generated Makefile rules for rules several outputs
2f66a3f94953 Whitespace change to test the new GYP waterfalls
3601f26003c6 Make dump_dependency_json.py write <| list files to the
output directory rather than the source tree
8866260996c0 win: prefer amd64_x86 compiler on >= 2013, not just 2013
0bb67471bca0 Slightly better docs for git instead of svn
f34b9aa7c9d6 Remove the Android generator
9f594095c5b1 Added msvs_application_type_revision for winrt compilation
c0cf1f22eb42 Revert "Stop checking for duplicate basenames"
4dd5d3c614fb Update shared_library test after c0cf1f22eb
29e94a3285ee Avoid lint presubmit error in dump_dependency_json
08429da7955a Update cmake generator to handle Skia Android build
aa537916dcb5 msvs: Make sure stdout/stderr from rule commands get logged
fdc7b812f99e Makes analyzer always output static_libraries that have
changed
79de4031069f Fix gyp->make translation of rules with several outputs
9b2b25aececd Correct braces in input format reference doc
b4781fc38236 MSVS: Normalize paths against gyp directory
127b311bf61d Adds some debugging output to analyzer
fdcd8bc10c93 More debugging for analyzer
acfc10d29072 Revert "MSVS: Normalize paths against gyp directory."
5122240c5e5c Fix support for iOS today extensions on latest Xcode beta
ae276266d580 Make DependencyGraph.DeepDependencies() depth-first
25ed9ac4ac2a Do not remote duplicate entries from ldflags when
generating ninja files as it changes behavior
6ee91ad86598 Reduce DefaultConcurrentLinks from phys/4GB to phys/5GB
658f3a81995b Disable currently failing gyp tests on win to make the bots
green
479dacf7be5f Disable GYP tests currently failing on the Mac bot
36d99ff23099 Disable test/win/gyptest-link-defrelink.py
d6adc48df899 Fix the default tryserver lists in PRESUBMIT.py
81c2e5ff92af Added msvs_target_platform_version and
msvs_target_platform_minversion for winrt compilation
010fb9d696e7 msvs_emulation: Add support for StackReserveSize and
StackCommitSize
edccc7bad7da Analyzer didn't match correctly targets that defined path
to inputs with '.' relative path values. So let normalize
path before matching
bae26e800c7f Inject pylib first in the path. This ensures that test load
the version of pylib in this repo, not elsewhere on the
system
008cf1c04393 Improve error messages when <!(commands) fail
121d89dfcd4f Make RelativePath use abspath rather than realpath for the
'path' variable. This allows gyp to work correctly in
symlink-heavy environments. Basically, this is because gyp
paths need to be in a consistent tree, so we need to
compute a path to the target within the *stated* tree, even
if it is not the real underlying path to the target. The
'relative_path' variable does need to be resolved using
realpath, since gyp or the underlying build system might cd
to it before looking for the 'path' target
2b17e0b26a93 Fix paths with different seperators being compared in the
analyzer on Windows
5d01a8cda53b Revert "Make RelativePath use abspath rather than realpath
for the 'path' variable."
1f374df95de1 Make sure GYP supports compiling managed code
cf3170e30578 Update gyp LINK_COMMANDS_AIX to support both 32-bit and
64-bit files. * cmd_alink: Add -X32_64 option. *
cmd_alink_thin: Add -X32_64 option
01528c724483 Fallback to '.tbd' for system missing '.dylib'
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 e2e928bacd07fead99a18cb08d64cb24e131d3e5
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
702ac58e4772 Add new target type called windows_driver. * Modify GYP to
set the PlatformToolset, the DriverType and the
TargetVersion * Add msvs_target_version configuration
5dc5a5b1718e fix common "NameError"s
920ee58c3d31 Hash intermediate file name to avoid ENAMETOOLONG
ef2f29a7311b msvs: Allow target platform version without WinRT
940a15ee3f1c Update shared library extension on AIX to .a
9733aa652da4 Set up a CQ for gyp
a7055b3989c1 Make Gerrit the default code review system for gyp
aae1e3efb507 CQ config: add gerrit CQAbility verifier
95da7665b1a3 [win-test] loosen win-driver-target-type test
eb296f67da07 [win] Add support for MS VS2017 (via Registry)
19495aa28282 Update test/no-cpp/gyptest-no-cpp
a94b02ec68fb Disable a bunch of tests on Mac
ae76d9198630 Clean up gyptest.py
b62d04ff85e6 win,ninja: ninja generator better on windows
8dc77241251e Disable flaky test/copies/gyptest-all under msvs
e8850240a433 Fix MSVC++ 32-on-32 builds after b62d04ff85e6
ffd524cefaad win ninja/make: Always use a native compiler executable
with MSVS 2017
a478c1ab51ea win: mkdir even when copying directory
d61a9397e668 mac_tool.py: Handle non-zero ibtool return code
4801a5331ae6 gyp: update xml string encoding conversion
324dd166b7c0 gyp: show descriptive Windows SDK detection error
Change-Id: I7b9e9bf9098469e94e657aa46ff7f6f7001a60df
Reviewed-on: https://chromium-review.googlesource.com/638090
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This will allow us to provide the right information for webview renderer
crashes. At the moment the crash information for the browser process is
captured (from the debuggerd output) instead.
BUG=754715
Change-Id: I409546311b6e38fe1cf804097c18d7bb2a015d83
Reviewed-on: https://chromium-review.googlesource.com/612381
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Change I361d8812df7b2977fe2630289059d31c3c9a4cc3 increased the maximum
number of threads for minidump_stackwalk. This change also increases the
maximum number of regions.
Change-Id: I61efd4453df8809bd9cd657546d1d6727cd10281
Reviewed-on: https://chromium-review.googlesource.com/588384
Reviewed-by: Mike Frysinger <vapier@chromium.org>
The main motivation for this change is to handle very large stack
traces, normally the result of infinite recursion. This part is
actually fairly simple, relaxing a few self-imposed limits on how
many frames we can unwind and the max size for stack memory.
Relaxing these limits requires stricter and more consistent checks for
stack unwinding. There are a number of unwinding invariants that apply
to all the platforms:
1. stack pointer (and frame pointer) must be within the stack memory
(frame pointer, if preset, must point to the right frame too)
2. unwinding must monotonically increase SP
(except for the first frame unwind, this must be a strict increase)
3. Instruction pointer (return address) must point to a valid location
4. stack pointer (and frame pointer) must be appropriately aligned
This change is focused on 2), which is enough to guarantee that the
unwinding doesn't get stuck in an infinite loop.
1) is implicitly validated part of accessing the stack memory
(explicit checks might be nice though).
4) is ABI specific and while it may be valuable in catching suspicious
frames is not in the scope of this change.
3) is also an interesting check but thanks to just-in-time compilation
it's more complex than just calling
StackWalker::InstructionAddressSeemsValid()
and we don't want to drop parts of the callstack due to an overly
conservative check.
Bug: chromium:735989
Change-Id: I9aaba77c7fd028942d77c87d51b5e6f94e136ddd
Reviewed-on: https://chromium-review.googlesource.com/563771
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
1. Fixing ExceptionHandlerTest.FirstChanceHandlerRuns:
exit() is not an async-signal-safe function (http://man7.org/linux/man-pages/man7/signal-safety.7.html)
2. Fixing entry point signature in minidump_dump
Changed "const char* argv[]" to "char* argv[]" to match the standard entry point signature
3. Updating .gitignore to exclude unit test artifacts
Change-Id: I9662898d0bd97769621fb6476a720105821c60f0
Reviewed-on: https://chromium-review.googlesource.com/562356
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
When rolling this into Chrome, we got compile failures due to
DoNullPointerDereference being undefined but the new FirstChanceHandlerRuns
tests depends on this and was still defined.
The fix is to only enable the FirstChanceHandlerRuns test on non-asan builds.
Bug:
Change-Id: I5a3da0a21e2d0dd663ffc01137496d16905293a6
Reviewed-on: https://chromium-review.googlesource.com/544186
Reviewed-by: Mark Mentovai <mark@chromium.org>
This change adds the option for Breakpad hosts to register a callback
that gets the first chance to handle an exception. The handler will
return true if it handled the exception and false otherwise.
The primary use case is V8's trap-based bounds checking support for
WebAssembly.
Bug:
Change-Id: I5aa5b87d1229f1cef905a00404fa2027ee86be56
Reviewed-on: https://chromium-review.googlesource.com/509994
Reviewed-by: Mark Mentovai <mark@chromium.org>
This should hopefully fix the ARMv8/IT fix to work on clang & gcc.
BUG=chromium:686903
Change-Id: Ib99f05a0cd8df2cb2d393e2ff951d3109cdb5f5b
Reviewed-on: https://chromium-review.googlesource.com/538213
Reviewed-by: Mark Mentovai <mark@chromium.org>
The bfd and gold linkers create segments like this: r/x, r/w where
the r/x segment covers the start of the ELF file.
lld's segments look like this: r, r/x, r/w where the r segment covers
the start of the ELF file.
So we cannot rely on the location of the r/x to tell where the start
of the ELF is. But we can still rely on the r and r/x mappings being
adjacent. So what we do is when we see an r segment followed by an r/x,
merge the r into the r/x and claim that it is executable. This way,
the minidump writer will continue to see a single executable segment
covering the entire executable.
Testing: "make check" passes when breakpad is compiled with
lld compiled from trunk (requires bug fix from LLVM r303689).
Also patched change into chromium and tested these builds:
$ cat args.gn
is_chrome_branded = true
is_debug = false
is_official_build = true
use_lld = true
allow_posix_link_time_opt = false
is_cfi = false
$ cat args.gn
target_os = "android"
target_cpu = "arm"
is_debug = false
is_official_build = true
is_chrome_branded = true
With both builds breakpad_unittests passes and
chrome/chrome_modern_public_apk create good minidumps after navigating
to chrome://inducebrowsercrashforrealz (checked that minidump contains
stack trace entry for content::HandleDebugURL).
Bug: chromium:716484
Change-Id: Ib6ed3a8420b83acf4a5962843930fb006734cb95
Reviewed-on: https://chromium-review.googlesource.com/513610
Reviewed-by: Primiano Tucci <primiano@chromium.org>
It is legal for an ELF to contain multiple PT_NOTEs, and that is in
fact what lld's output looks like.
Testing: "make check" and breakpad_unittests when patched into
chromium.
Bug: chromium:716484
Change-Id: I01d3f8679961e2cb7e789d4007de8914c6af357d
Reviewed-on: https://chromium-review.googlesource.com/513512
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Ted Mielczarek <ted@mielczarek.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
x86_64h has a different cpusubtype from x86_64. The h is for Haswell.
BUG=
Change-Id: Icf884e5699fe120c12d13aa57cd62db5b69a2ce6
Reviewed-on: https://chromium-review.googlesource.com/457171
Reviewed-by: Ted Mielczarek <ted@mielczarek.org>
The layout of Elf32_Nhdr and Elf64_Nhdr is the same, so remove
templating and code that extracts the elfclass from the ELF file.
Testing: "make check" and breakpad_unittests when patched into
chromium.
Bug: chromium:716484
Change-Id: I41442cfff48afc6ae1a5b604d22b67550a910376
Reviewed-on: https://chromium-review.googlesource.com/514450
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Also adds waits for all child processes spawned in MinidumpWriterTest.
Bug: 725754
Change-Id: I3248925993dede2c113ab1989b322a9d9c8f24bd
Reviewed-on: https://chromium-review.googlesource.com/513480
Reviewed-by: Mark Mentovai <mark@chromium.org>
Change a9fca58 made use of the O_CLOEXEC flag, which is not supported on
older Linux kernels. This change makes the use contingent on kernel
support.
Testing: I manually compiled breakpad on CentOS 5.8 running kernel
2.6.18-308.8.2.el5.centos.plusxen.
Bug: 730
Change-Id: I21dff928cfba3c156a56708913f65a0c7b5396a6
Reviewed-on: https://chromium-review.googlesource.com/498528
Reviewed-by: Mike Frysinger <vapier@chromium.org>
When writing a minidump on Linux, we called clone() in
linux/handler/exception_handler.cc with the CLONE_FILES flag. If the
parent process died while the child waited for the continuation signal,
the write side of the pipe 'fdes' stayed open in the child. The child
would not receive a SIGPIPE and would wait forever.
To fix this, we clone without CLONE_FILES and then close the
read-side of fdes in the master before the ptrace call. That way, if the
master dies, the child will receive a SIGPIPE and will die, too.
To test this I added a sleep() call before SendContinueSignalToChild()
and then killed the master, manually observing that the child would die,
too.
Bug: 728
Change-Id: Ifd72de835a34e7d9852ae1a362e707fdc6c96c7e
Reviewed-on: https://chromium-review.googlesource.com/464708
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Try to read the trace's registers by PTRACE_GETREGS if kernel doesn't support PTRACE_GETREGSET.
Bug:
Change-Id: I881f3a868789747ca217f22a93370c6914881f9a
Reviewed-on: https://chromium-review.googlesource.com/484479
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This patch ensures that two crashes taken within the same second have
different minidump names. The random characters used in the minidump
filename are now read from /dev/urandom where possible or generated via
arc4random(). If neither is available we fall back to regular rand() but
mixing the address of an object to the current time when generating the
random seed to make it slightly less predictable.
BUG=681
Change-Id: I2e97454859ed386e199b2628d6b7e87e16481b75
Reviewed-on: https://chromium-review.googlesource.com/445784
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Because we can't determine the top of userspace mappable memory
directly, we rely on the fact that the process stack is allocated at the
top of the address space (minus some randomization). Anything after that
should not count as free space.
BUG=695382
Change-Id: I68453aac9732c2bd4b87236b234518068dec6640
Reviewed-on: https://chromium-review.googlesource.com/446100
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Fix some build & test failures in the previous minidump_dump code.
BUG=chromium:598947
Change-Id: Ia8fce453265167368de96747a8a92af930e78245
Reviewed-on: https://chromium-review.googlesource.com/458881
Reviewed-by: Mike Frysinger <vapier@chromium.org>
The current stack output is one line byte string which is not easy for
humans to parse. Extend the print mode to support a hexdump-like view
and switch to that by default. Now we get something like:
Stack
00000000 20 67 7b 53 94 7f 00 00 01 00 00 00 00 00 00 00 | g{S...........|
00000010 00 70 c4 44 9a 25 00 00 08 65 7a 53 94 7f 00 00 |.p.D.%...ezS...|
BUG=chromium:598947
Change-Id: I868e1cf4faa435a14c5f1c35f94a5db4a49b6a6d
Reviewed-on: https://chromium-review.googlesource.com/404008
Reviewed-by: Mark Mentovai <mark@chromium.org>
In preparation for adding more flexibility to this tool, add a
proper parser for the command line flags. This uses the style
as seen in other breakpad tools.
BUG=chromium:598947
Change-Id: I95495e6ca7093be34d0d426f98a6c22880ff24a3
Reviewed-on: https://chromium-review.googlesource.com/457019
Reviewed-by: Mark Mentovai <mark@chromium.org>
This helps catch issues when rolling in Chromium.
Change-Id: I2e3f33df4a69b501d8c04799ee0ac03a4bed9ac9
Reviewed-on: https://chromium-review.googlesource.com/459477
Reviewed-by: Mike Frysinger <vapier@chromium.org>
If the crashing thread doesn't reference the principal mapping we can
assume that not only is that thread uninteresting from a debugging
perspective, the whole crash is uninteresting. In that case we should
not generate a minidump at all.
BUG=703599
Change-Id: Ia25bbb8adb79d04dcaf3992c3d2474f3b9b1f796
Reviewed-on: https://chromium-review.googlesource.com/457338
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This change is fixing LinuxPtraceDumperTest.SanitizeStackCopy
test case.
Change-Id: I1eb3becfd4b3660bc5529b5d2a5e35db0b6eb6e0
Reviewed-on: https://chromium-review.googlesource.com/458277
Reviewed-by: Mark Mentovai <mark@chromium.org>
If another memory region of interest (e.g. a thread stack) randomly happens
to lie immediately before the page allocated by this test, the memory
regions can be coalesced in the minidump generated. Relax this test so it
correctly handles the case where the expected 256 bytes around the IP aren't
at the start of the minidump memory region.
Alternatively, that could be avoided by reserving the page before the page
used for this test, in which case this test is degenerate with
InstructionPointerMemoryMinBound and can be removed.
BUG=
Change-Id: Ib1bfb242b2c0acaa090df68334a02ac434ad880c
Reviewed-on: https://chromium-review.googlesource.com/456702
Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Turn DumpSymsRegressionTest into a parameterized test so it's easier to
see which test file is failing
* Convert dump_syms_regtest.sym to DOS line endings, being careful to
preserve the required spaces at the end of 'STACK WIN' lines
* In test #4 (omap_reorder_bbs), since the .exe corresponding to the .pdb is
not present, no INFO line is generated in the .sym file. Update .sym file.
* Stop collecting stderr from dump_syms. Future work: perhaps it's worth
collecting stderr to compare with a different file to verify that "Couldn't
locate EXE or DLL file" is output when expected?
* Regenerate testdata for test #5 (dump_syms_regtest64), which currently
does not pass, seemingly due a mis-match in the PDB age between the .pdb
file and the .sym file. Also add the .exe corresponding to the .pdb
present, to provide CFI
BUG=
Change-Id: I54fab866437c9e1bad3a5534cef4fe4b6ae47cd2
Reviewed-on: https://chromium-review.googlesource.com/453178
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Currently on MIPS we accidentally terminate stackwalk if $sp value doesn't change between frames
which results in incomplete callchain terminated at the point of first tailcall encountered.
Change-Id: I8f1ed1df958d8f0a9eb11fd7800062184d8f1ee2
Reviewed-on: https://chromium-review.googlesource.com/449755
Reviewed-by: Mark Mentovai <mark@chromium.org>
ExceptionHandlerTest.InvalidParameterMiniDumpTest and
ExceptionHandlerTest.PureVirtualCallMiniDumpTest both also exercise a
feature that if the MiniDumpWithFullMemory MINIDUMP_TYPE is used, both
UUID.dmp and UUID-full.dmp files are written.
This is currently broken, and requesting a minidump with
MiniDumpWithFullMemory MINIDUMP_TYPE fails, as the file handle for the full
dump is not set.
Call GenerateFullDumpFile() if MiniDumpWithFullMemory is requested, to
generate a filename for the full dump file and set the file handle.
Currently GenerateFullDumpFile() also generates another UUID for the full
dump filename, so also make the private method
MinidumpGenerator::GenerateDumpFilePath() idempotent (so the same UUID is
reused)
(Note that calling Generate(|Full)DumpFile() more than once is not
permitted, so there's no behaviour where this changed the UUID to preserve)
BUG=
Change-Id: I74304f38b398f53da1c24f368dedfba8463da9e5
Reviewed-on: https://chromium-review.googlesource.com/452978
Reviewed-by: Mike Frysinger <vapier@chromium.org>
For iOS apps, product and version information is
now automatically provided as part of the crash
report upload URL to allow for early rejections.
Change-Id: Ia19c490c38023f9e23ec8a537f7a203ff1e642d7
Reviewed-on: https://chromium-review.googlesource.com/436164
Reviewed-by: Roman Margold <rmargold@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Because many apps still support iOS 8, they were defaulting to
deprecated NSURLConnection even if the code ran on iOS 10.
NSURLConnection requires a run loop and hence the code did not
always upload if the queue ran on a thread without a Run Loop.
This should improve break pad uploads
BUG=
Change-Id: I7bff80ea977fd1ab13c8812ed933ef842dab417f
Reviewed-on: https://chromium-review.googlesource.com/451880
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Clang complains about bad format strings (DWORD is an unsigned long, not
unsigned int) and signed/unsigned comparison.
This change is necessary for https://codereview.chromium.org/2712423002/
BUG=245456
Change-Id: I58da92d43d90ac535c165fca346ee6866dfce22e
Reviewed-on: https://chromium-review.googlesource.com/448037
Reviewed-by: Mark Mentovai <mark@chromium.org>
We want the updated ARMv8/IT fix in the clone code path that newer
versions of clang warn about.
Change-Id: Ibd2d301d94cd09affc4225d013547ee1e24fac82
Reviewed-on: https://chromium-review.googlesource.com/448001
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
This was set manually on Chrome's built binary before
https://codereview.chromium.org/2173533002 but wasn't added to the build
file.
After this change:
c:\src\breakpad\src\src>dumpbin /headers tools\windows\symupload\Release\symupload.exe | grep large
Application can handle large (>2GB) addresses
This change only affects x86 builds.
R=mark@chromium.org
BUG=chromium:696911
Change-Id: I8f1bd5535af242edde51e70c60cf33b6170855ea
Reviewed-on: https://chromium-review.googlesource.com/447780
Reviewed-by: Mark Mentovai <mark@chromium.org>
Rather than relying on the process stack having all the things that
should/shouldn't be sanitized, create synthetic stacks to test all of
the important cases.
BUG=664460
Change-Id: I959266390e94d6fb83ca8ef11ac19fac89e68c31
Reviewed-on: https://chromium-review.googlesource.com/446108
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This handles a case encountered in ntdll.dll symbols for Windows 7,
where a PUBLIC would be emitted only for the entry point to the
function. The body of the function, however, is split in a PGO-ish
fashion to another remote location in the binary. Because of this, there
were large gaps in the RVA space that would be attributed to the "last"
function that happened to have an entry point before the gap. In
practice, something like this:
0x100 Func1
0x110 Func2
0x120 Func3
0x130 Func4
...
0x800 LaterFuncs
The bodies of Func1/2/3 tend to be implemented as a fast-path check,
followed by a jmp to somewhere in the range between 0x130 and 0x800.
Because no symbols are emitted for this range, everything is attributed
to Func4, causing crash misattribution.
In this CL, the change is: after emitting the entry point symbol, also
walk in the original OMAP entries through the untranslated binary, and
for each block until we resolve to a new symbol (via the same mechanism
as we found the entry point) emit another PUBLIC indicating that there's
another block that belongs to that symbol. This effectively breaks up
the "0x130 - 0x800" range above.
R=mark@chromium.org
BUG=chromium:678874
Change-Id: Ib3741abab2e7158c81e3e34bca4340ce4d3153a1
Reviewed-on: https://chromium-review.googlesource.com/446717
Reviewed-by: Mark Mentovai <mark@chromium.org>