forked from google/breakpad
-
Notifications
You must be signed in to change notification settings - Fork 13
Crash Handler #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Swatinem
wants to merge
383
commits into
master
Choose a base branch
from
handler
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Crash Handler #13
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This expectation started failing at 8b68c72. Remove it. This is the only expectation that exists in this test, but the test may be useful for internal asserts performed in the code under test. Bug: b:235999011 Change-Id: Iab5c073161ce66fdf362b7da31c19f471c7a79bf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3727478 Reviewed-by: Mike Frysinger <[email protected]>
pe_file.cc, used in minidump_writer.cc, was not included in LOCAL_SRC_FILES. This caused breakpad to fail in build time, as it didn't find the file. Tested using ndk 21.4.7075529, building on an arm64 device. Change-Id: I192539a52c1344eba9999c6780bcd8b83ea7e772 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3723683 Reviewed-by: Joshua Peraza <[email protected]>
We're using autoconf-2.69 (from 2012) now and not testing anything older, so raise the min version to that. Also bump to automake-1.13 (from 2012) to keep a bit inline. Change-Id: I903144f214fef835364474e1607a26e846c99ff6 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3734168 Reviewed-by: George Burgess <[email protected]>
Previous updates to these were partially done. Rerun with the right versions of autoconf-2.69 & automake-1.16.5. Change-Id: Ifd6c8405b0b50c5d3cf4ea536a7db5762d62644e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3734167 Reviewed-by: George Burgess <[email protected]>
Leverage the existing default logic & argument parsing that turn the values yes/no into true/false to simplify the code so we don't create duplicate variables. This kills a lot of boilerplate. Change-Id: Ib7c8e00f7b23e67ed05f3b35e523c235aed41129 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3734169 Reviewed-by: George Burgess <[email protected]>
There are cases where the debug_abbrev entities are not sequential, for example, in Xamarin system dlls. This change gracefully handles such a case. Change-Id: Ib270393d3cf9fd18efd99d15d0fba4f96748188a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3738879 Reviewed-by: Joshua Peraza <[email protected]>
Currently, `./configure` supports
`--with-rustc-demangle=${path_to_crate_root}` as the only mechanism to
enable rustc-demangle support. This CL adds support for cases where
keeping or synthesizing a full `cargo` build tree is hacky in comparison
to simply installing `rustc_demangle.h` in e.g., /usr/include, and
putting `librustc_demangle.a` in e.g., `/usr/lib64`.
Bug: b:235999011
Change-Id: Id5fe2a24c4b6e33c4df0e10c86ba99c7cf890ab2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3733672
Reviewed-by: Mike Frysinger <[email protected]>
On CrOS, a breakpad update is breaking: ``` google-breakpad-2022.07.03.054510-r210: no member named 'sort' in namespace 'std' google-breakpad-2022.07.03.054510-r210: std::sort(abbrevs_->begin(), abbrevs_->end(), google-breakpad-2022.07.03.054510-r210: ~~~~~^ ``` Looks like we're missing the include for `sort`. Bug: 235999011 Change-Id: I917389c12b370357fd1fc7cb08af0b9d7f315c84 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3741510 Reviewed-by: Mike Frysinger <[email protected]>
exploitability_linux assumed a 15 byte buffer to always be passed in as `raw_bytes` for `DisassembleBytes`. This test was passing in a 6 byte buffer. Make `DisassembleBytes` accept a length. Bug: b:235999011 Change-Id: I696c66357faa1c7d762c64009864123897f03488 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756170 Reviewed-by: Mike Frysinger <[email protected]>
These `GoogleCrashdumpUploader` instances need to be cleaned up; place them on the stack. Doing this unmasks another bug in this code: the `MockLibcurlWrapper` instance we're passing into these `GoogleCrashdumpUploader`s becomes owned by the `GoogleCrashdumpUploader` in question. Putting them on the stack makes `free()` unhappy when the `GoogleCrashdumpUploader` they're given to gets destructed. Bug: b:235999011 Change-Id: I5d0424a1c09d32ea34a8fa6f5e52d3695ee6e857 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756172 Reviewed-by: Mike Frysinger <[email protected]>
Everything in `functions_` is owned by the current `StabsToModule`. If we fail to add something from `functions_`, we need to be sure to dispose of it properly, since `module_` will not take ownership. Bug: b:235999011 Change-Id: I3b965709ea2016a065b50588f4132d14a1de7725 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756733 Reviewed-by: Mike Frysinger <[email protected]>
`AddFunction` only takes ownership of the pointer passed to it if it returns true. Since it returns false when adding `function2`, we need to free it. Bug: b:235999011 Change-Id: I11984103c2c153ff0daf2c9690f9c88d04a2131b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756732 Reviewed-by: Mike Frysinger <[email protected]>
This test's constructor fails to fully initialize this raw context. As a result, we have at least one use of uninitialized memory in CFI.At4004. This causes said test to fail under ASAN. Bug: b:235999011 Change-Id: I3279da8ac3414eb8c90f3949a1db47a03e750a94 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756749 Reviewed-by: Mike Frysinger <[email protected]>
On ARM, this write fails to build: comparison of integers of different signs: 'ssize_t' (aka 'int') and 'const unsigned int' [-Werror,-Wsign-compare] Since we check that it's <= 15 above, we can simply cast it without issue. Bug: b:235999011 Change-Id: Id75fc0df74e88b347df615df06567e96c6b59a1d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3758800 Reviewed-by: Mike Frysinger <[email protected]>
Explicitly call out where overflows are expected, and add appropriate checking for them. BUG=b:235999011 TEST=Unittests on CrOS and Linux Change-Id: I999a6996183c2f4afc16a1c0188dee3bd64d7f09 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3759630 Reviewed-by: Mike Frysinger <[email protected]>
deps: Update breakpad to 2022-07-18
Previously these all resulted in EXCEPTION_STACK_BUFFER_OVERRUN but this hides various specific fast fail crash types, which are now provided based on the exception's subcode. Tests: added to minidump_process_unittest.cc Bug: 865632 Change-Id: Ic6693de247da55cf6d132d108c6e20c635f366b1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3771437 Reviewed-by: Robert Sesek <[email protected]>
DW_CFA_AARCH64_negate_ra_state uses the same encoding as DW_CFA_GNU_window_save. It is meant to indicate that x30/LR has been signed, but breakpad does not require this information. Bug: b/239086293 Change-Id: I5a17bd5e0673a3ff80a8c6e347013d66054314e8 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3781136 Reviewed-by: Mark Mentovai <[email protected]>
- Resets `selected_object_file_` when a new file is read. This was a dangling pointer previously. - When `-a` is provided, ensures that both parts of a split module use the given architecture. Bug: None Change-Id: I581d41b0eee4ec2b0d598fb80b9065e7ebde0e0d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3788222 Reviewed-by: Mark Mentovai <[email protected]>
Bug: b/239086293 Change-Id: I8b514e8640f0f2496cea8d0b516124c0e3a3b81a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3788698 Reviewed-by: Mark Mentovai <[email protected]>
This implements the error messages from https://docs.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/idiadatasource-loaddataforexe?view=vs-2022 and https://docs.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/idiadatasource-loaddatafrompdb?view=vs-2022 instead of having just a generic error message. Signed-off-by: Lorenzo Alberto Maria Ambrosi <[email protected]> Bug: https://bugs.chromium.org/p/google-breakpad/issues/detail?id=866 Change-Id: I23c0e80d31afb402a70cb0cdded78d3d34ac5fff Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3810512 Reviewed-by: Mark Mentovai <[email protected]> Reviewed-by: Mike Frysinger <[email protected]>
…essing goes wrong - If symbol table section is malformed, skip them. - SkipDIE and ProcessDIE return nullptr when processing goes wrong due to malformed debug info, stop processing in this case. Bug: 1349354 Change-Id: Ia1d3e3591bbd2dad8b9eb351c1882cfc03bfad4b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3821448 Reviewed-by: Joshua Peraza <[email protected]>
Change-Id: I96887504ad9dc47dda6ebc5be7c193a1eb1f94d1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3825137 Reviewed-by: Zequan Wu <[email protected]>
Change-Id: Ic03ecc055c4eb097fbaaf8c8cd2c0a68d5aea8a0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3826785 Reviewed-by: Joshua Peraza <[email protected]>
This CL fixes the following error detected on a WebRTC bot:
FAILED: obj/third_party/breakpad/utilities/ConfigFile.o
/opt/s/w/ir/cache/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/breakpad/utilities/ConfigFile.o.d -DCR_XCODE_VERSION=1400 -DCR_CLANG_REVISION=\"llvmorg-16-init-907-g8b740747-1\" -D_LIBCPP_ABI_NAMESPACE=Cr -D_LIBCPP_ABI_VERSION=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=9f503bebdb9a89f5ee82b82142109b26d688f40c -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/breakpad/breakpad/src -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fno-omit-frame-pointer -g2 -gdwarf-aranges -Xclang -debug-info-kind=limited -isysroot sdk/xcode_links/MacOSX13.0.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang raw-ref-template-as-trivial-member -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-c++11-narrowing -Wno-unused-but-set-variable -Wno-misleading-indentation -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -std=c++17 -Wno-trigraphs -fobjc-call-cxx-cdtors -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../third_party/breakpad/breakpad/src/client/mac/crash_generation/ConfigFile.mm -o obj/third_party/breakpad/utilities/ConfigFile.o
../../third_party/breakpad/breakpad/src/client/mac/crash_generation/ConfigFile.mm:108:5: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(processUptimeString, "%llu",
^
sdk/xcode_links/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
sdk/xcode_links/MacOSX13.0.sdk/usr/include/sys/cdefs.h:214:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
../../third_party/breakpad/breakpad/src/client/mac/crash_generation/ConfigFile.mm:114:3: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(processCrashtimeString, "%zd", tv.tv_sec);
^
sdk/xcode_links/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
sdk/xcode_links/MacOSX13.0.sdk/usr/include/sys/cdefs.h:214:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
Bug: webrtc:14342
Change-Id: I923ab3f9155eb36aa2edf9b1d38c123e3e6ad029
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3829529
Reviewed-by: Mark Mentovai <[email protected]>
Change-Id: Iefea0aea13deb86d71d663c8344a2d3c658caf4a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3756171 Reviewed-by: Ivan Penkov <[email protected]>
Change-Id: Ibfe719c3ed303cd45884863746cf07ec22dba45d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3863388 Reviewed-by: Nelson Billing <[email protected]>
Change-Id: I35f35d9d31d97c8237f0d90170be04716d820028 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3873644 Reviewed-by: Mike Frysinger <[email protected]>
Fix a few issues Coverity detected in exploitability_linux.cc: CID 277681, 277682, 277683 Change-Id: I8ad0581f075da7346b9be8100b3690555a358b16 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3872234 Reviewed-by: Mike Frysinger <[email protected]>
This reverts commit c8318f0. Reason for revert: ARMv7 does not have a standard frame pointer gcc and clang have inconsistent frame pointer semantics on ARM. Frame pointers should not be used on this architecture for unwinding. Original change's description: > ARM: use r11 as frame pointer during stack unwind > > Bug: b/340226382 > Change-Id: Idb3d6e502a5a1e25179c3d5f2a19ac4cd79cd103 > Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5636127 > Reviewed-by: Ivan Penkov <[email protected]> Bug: b/340226382 Bug: b/349146521 Change-Id: I1f04aba79ad0ab14ad66146c47b545a8fa7bca53 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6329730 Reviewed-by: Joshua Peraza <[email protected]>
Nothing uses this, and it wasn't adopted into the C++ standard, so delete it to clean up. Change-Id: Icc9d0256bb29270cd08f4684acff55bf2a9a7dea Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6346968 Reviewed-by: Lei Zhang <[email protected]>
Compiling with GCC 14.2 and C++20 triggers an error:
$ g++ -std=gnu++20 -DHAVE_CONFIG_H -I. -I../src -I./src -I../src/src \
-Wmissing-braces -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-compare -Wunused-local-typedefs -Wunused-variable -Wvla -Werror \
-fPIC -O2 -g -c ../src/src/processor/minidump.cc
In file included from /usr/include/c++/14/memory:78,
from ../src/src/processor/minidump.cc:63:
In member function ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = std::__cxx11::basic_string<char>]’,
inlined from ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = std::__cxx11::basic_string<char>]’ at /usr/include/c++/14/bits/unique_ptr.h:87:7,
inlined from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = std::__cxx11::basic_string<char>; _Dp = std::default_delete<std::__cxx11::basic_string<char> >]’ at /usr/include/c++/14/bits/unique_ptr.h:398:17,
inlined from ‘virtual std::string google_breakpad::MinidumpModule::debug_file() const’ at ../src/src/processor/minidump.cc:2576:9:
/usr/include/c++/14/bits/unique_ptr.h:93:9: error: ‘void operator delete(void*, std::size_t)’ called on unallocated object ‘file’ [-Werror=free-nonheap-object]
93 | delete __ptr;
| ^~~~~~~~~~~~
../src/src/processor/minidump.cc: In member function ‘virtual std::string google_breakpad::MinidumpModule::debug_file() const’:
../src/src/processor/minidump.cc:2509:10: note: declared here
2509 | string file;
| ^~~~
Workaround this by forcing a new string to be constructed from the
memory, and then moved into the stack file object.
Change-Id: I1e2e6c2e30723daefca2046a3e5f5a580975301b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6346970
Reviewed-by: Lei Zhang <[email protected]>
We've required C++17 for a while now, and that offers unique_ptr which is functionally the same as our scoped_ptr. Replace our custom code with an alias to the standard API. If this sticks, we can update the entire tree to use unique_ptr directly. Change-Id: I3ce01f710dc5c62d05df36d4c28059dddd3f71a9 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6346969 Reviewed-by: Lei Zhang <[email protected]>
Change-Id: Ib07dcda1ca94fc2eda225a76d6fcb52c9ebd1700 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6297837 Reviewed-by: Troy Wang <[email protected]>
Chromium switched to C++20 2 years ago, and we want to start using features from it, so update to it too. Change-Id: I97067f5015be6369506de5389913c60f336130a0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6347230 Reviewed-by: Mark Mentovai <[email protected]>
Passes `make check` on Linux for me, and it's close to the version the Chromium tree has been using for a while now. Certainly much closer than the 1.11.0 version we're pinned to. Change-Id: I494cbf540cf4bd525d4e35c28da2c22d59efec1b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6367938 Reviewed-by: Lei Zhang <[email protected]>
This reverts commit f8d05a9. This reverts commit a70e77e. This breaks src/processor/minidump_stackwalk_test on Linux: $ make check VERBOSE=1 ... ../src/src/processor/testdata/minidump2.stackwalk.out @@ -8,6 +8,9 @@ Crash reason: EXCEPTION_ACCESS_VIOLATION_WRITE Crash address: 0x45 +Crash parameters: + value: 1 description: + value: 69 description: Process uptime: 0 seconds Thread 0 (crashed) ... Change-Id: Iae755826913c5cbc97f3493bbe288d17aa0205d2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6371501 Reviewed-by: Lei Zhang <[email protected]>
Delete the scoped_ptr alias and switch code to std::unique_ptr directly. Change-Id: I3a25e07d66f0a27d16f82443b01c4db93a2cf0d9 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6367939 Reviewed-by: Lei Zhang <[email protected]>
Someday the bot will send us LSS updates automatically. Change-Id: I99640b2d466e555b9a0623c28a437a3ddab502d4 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6381405 Reviewed-by: Lei Zhang <[email protected]>
Change NULL to nullptr across the codebase. Drop stddef.h in a few places where it is no longer needed. Change-Id: I9ca16bc243e0c7b8900b175b0426ee6c9a55ecef Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6381404 Reviewed-by: Lei Zhang <[email protected]>
Some refactors cleaned up headers in places they weren't used, but other files were relying on those indirect includes. Add assert.h to the various C++ files that use assert(). Change-Id: I7be2b1108548bb1fb126548cb3b891a76024f83b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6387418 Reviewed-by: Lei Zhang <[email protected]>
Change-Id: I8f08b7ea098d6e7814d84677487d7f96ead5cdcc Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6388176 Reviewed-by: Lei Zhang <[email protected]>
We require C++20 now, so we can switch to the C++17 [[fallthrough]]. Change-Id: I5c34cd4154bca28f4d950524e5b2ffb1e7ec8afd Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6388177 Reviewed-by: Lei Zhang <[email protected]>
Some Windows code was misusing NULL, so when it was changed to nullptr,
the extra compile-time checks caught it and broke.
Since crash_id_ is an integer, initialize it to 0, not a pointer.
client/windows/crash_generation/client_info.cc(60,7): error:
cannot initialize a member subobject of type 'DWORD' (aka 'unsigned long') with an rvalue of type 'std::nullptr_t'
60 | crash_id_(nullptr) {
Casting a pointer to the MINIDUMP_TYPE enum doesn't make sense,
especially when the enum with value 0 is a valid value. Switch
to MiniDumpNormal since that's what NULL (0) was doing.
client/windows/crash_generation/crash_generation_client.cc(209,23): error:
static_cast from 'std::nullptr_t' to 'MINIDUMP_TYPE' (aka '_MINIDUMP_TYPE') is not allowed
209 | static_cast<MINIDUMP_TYPE>(nullptr), nullptr, nullptr,
While these are ULONG_PTR, MSDN says they're status codes & byte counts,
so initialize both to 0 rather than a null pointer.
client/windows/crash_generation/crash_generation_server.cc(568,26): error:
assigning to 'ULONG_PTR' (aka 'unsigned long long') from incompatible type 'std::nullptr_t'
568 | overlapped_.Internal = nullptr;
client/windows/crash_generation/crash_generation_server.cc(569,30): error:
assigning to 'ULONG_PTR' (aka 'unsigned long long') from incompatible type 'std::nullptr_t'
569 | overlapped_.InternalHigh = nullptr;
Since handle_ is an integer, initialize it to 0.
client/windows/crash_generation/minidump_generator.cc(109,7): error:
cannot initialize a member subobject of type 'ULONG64' (aka 'unsigned long long') with an rvalue of type 'std::nullptr_t'
109 | handle_(nullptr) {
While Linux defines AppMemory.ptr as void*, Windows defines it as
ULONG64. Cast nullptr to that to match other ptr code in this file.
client/windows/handler/exception_handler.cc(256,28): error:
assigning to 'ULONG64' (aka 'unsigned long long') from incompatible type 'std::nullptr_t'
256 | instruction_memory.ptr = nullptr;
The last arg to WinHttpConnect is a reserved integer, not a pointer,
so passing it NULL was incorrect -- change to 0 per MSDN.
tools/windows/converter_exe/winhttp_client.cc(150,42): error:
cannot initialize a parameter of type 'DWORD' (aka 'unsigned long') with an rvalue of type 'std::nullptr_t'
150 | nullptr));
We need to pass explicit 0 for DWORD_PTR types.
tools/windows/converter_exe/wininet_client.cc(175,39): error:
cannot initialize a parameter of type 'DWORD_PTR' (aka 'unsigned long long') with an rvalue of type 'std::nullptr_t'
175 | nullptr));
Change-Id: Id5f5b65a4279fe7aa1cbc1b99b18813d6a150117
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6388180
Reviewed-by: Lei Zhang <[email protected]>
Further work for Windows and NULL->nullptr. Pass explicit 0 for DWORD_PTR types. tools/windows/converter_exe/winhttp_client.cc(188,33): error: cannot initialize a parameter of type 'DWORD_PTR' (aka 'unsigned long long') with an rvalue of type 'std::nullptr_t' 188 | nullptr); Change-Id: I5c62094dfe05b6edcee293284ee02840cccab517 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6387423 Reviewed-by: Lei Zhang <[email protected]>
Bug: chromium:407791454 Change-Id: Ib07a9ef0e5559fa076d7f78c4e5313c9b62b5575 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6420191 Reviewed-by: Mark Mentovai <[email protected]>
Missed a PlistBuddy use last time; also fixed a logic bug when compiling system roots. Bug: chromium:407791454 Change-Id: I1c283d4e7ba4c527570b845bf96b8b88f96cf6cb Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6443735 Reviewed-by: Mark Mentovai <[email protected]>
Bug: 407791454 Change-Id: I614d31a0d889f99d4c66ebd8240aeaeb3c929def Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6508090 Reviewed-by: Mark Mentovai <[email protected]>
… when dumping This helps enable uploading all symbols for an architecture together for resumability, and lets us record what has been uploaded at better granularity. Bug: 407791454 Change-Id: I3720409405af6a92ba161269da4926cf5fc82d0c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6532576 Reviewed-by: Mark Mentovai <[email protected]>
`-Wnontrivial-memcall` warning is raised: passing non-trivially-copyable destination parameter to `memset`. It's safe to suppress the warning with `static_cast<void*>(&msg_)` because `ProtocolMessage msg_` is POD with disabled copy ctor and `operator=`. Change-Id: Iec53a946e1fc5570bf77f792222a4958b20900f0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6508032 Reviewed-by: Lei Zhang <[email protected]> Reviewed-by: Mike Frysinger <[email protected]>
Replaced all alignments like `size + (alignment - 1) & (~alignment + 1)` and `size + (alignment - 1) & -alignment` with the function call, except one in common/windows/pe_util.cc, that can't include common/memory_allocator.h. Fixed a bug in computing aligned file name size in `AugmentMappings()` in tools/linux/md2core/minidump-2-core.cc: it was `(filename.size() + 8) & ~7`, shall be `(filename.size() + 7) & ~7`. Change-Id: Id3dbdc71193c1215de67e59915e0067c2637e076 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6333238 Reviewed-by: Lei Zhang <[email protected]> Reviewed-by: Mike Frysinger <[email protected]>
This is to fix build error when we set use_libcxx_modules=true in chromium build for ChromeOS. Bug: 40263312 Change-Id: I9ec8cf3d0de3b1099100a8d524c939d58586ad34 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6629550 Reviewed-by: Lei Zhang <[email protected]>
With C++ modules enabled (`-fmodules`), including a system header like <stdint.h> from within a namespace is not permitted. This was causing a build failure in the `:stackwalk_common` target: fatal error: import of module '_Builtin_stdint' appears within namespace 'libdis' The code in `disassembler_x86.h` was wrapping the `libdisasm` third-party library, including its headers, inside a `libdis` namespace. This change removes the `libdis` namespace wrapper, resolving the build failure. This allows C++ modules to be re-enabled for the breakpad target, contributing to the broader effort to use modules for system headers. Bug: 424364315 Change-Id: I9e5bfe29f63b6e1659c7912a15a3eaa376b865d2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6636461 Reviewed-by: Primiano Tucci <[email protected]>
…akpad into chore/update_2025_06_13
chore: upstream update 2025-06-13
#43) * fix(win): dynamically size minidump_path in handler instead of using MAX_PATH * reset next_minidump_path_[c_] if swprintf fails
…#44) * Add README for Sentry modifications to Breakpad This README details the modifications made to the Google Breakpad fork maintained by Sentry, including build system changes and platform support. Based on the Crashpad-Sentry-README https://github.com/getsentry/crashpad/blob/getsentry/README.getsentry.md * Update README with Sentry modifications link Add section on Sentry modifications and reference README.getsentry.md * update * clean up sentry readme Updated README to reflect CMake integration and removed outdated build instructions. * Add macOS handler callback modification bullet point
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To better separate our patches to the processor (in the
masterbranch) and the client used insentry-native.This branch contains patches for the client / handler only.