aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler
Commit message (Collapse)AuthorAgeFilesLines
...
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-063-23/+23
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* size_limit_ member of minidump_descriptor ignored in copy constructorted.mielczarek@gmail.com2013-02-142-2/+4
| | | | | | Patch by Avishai Hendel <avish@fb.com>, R=mkrebs at https://codereview.appspot.com/7305060/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1114 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some issues with -Werror=sign-compare on Android buildsted.mielczarek@gmail.com2013-02-011-1/+1
| | | | | | R=digit at https://breakpad.appspot.com/524002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1110 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Move scoped_ptr.h to commonted.mielczarek@gmail.com2013-01-171-1/+1
| | | | | | R=mark at https://breakpad.appspot.com/509002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1096 4c0a9323-5329-0410-9bdc-e9ce6186880e
* ExceptionHandler::HandleSignalmark@chromium.org2013-01-141-2/+5
| | | | | | | | | | | | | | | (https://code.google.com/searchframe#OAMlx_jo-ck/src/breakpad/src/client/linux/handler/exception_handler.cc&exact_package=chromium&q=SI_USER&type=cs&l=389) requires si_pid to be equal to getpid() for SI_USER signals. This is a patch by Lei Zhang (thestig@chromium.org) that fixes the issue with Chrome+ASan being unable to upload the crash dump to the crash server when the seccomp sandbox is on. Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://codereview.appspot.com/7066068/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1095 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix unused variable warning in optimized build (fix proveded by Matthew Riley)ivan.penkov@gmail.com2012-11-211-2/+3
| | | | | | | | http://breakpad.appspot.com/499002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1084 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Cleaning up google-breakpad source code of signed-unsigned comparison warningsivan.penkov@gmail.com2012-11-212-20/+20
| | | | | | | | http://breakpad.appspot.com/488002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1083 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add optional file size limit for minidumpsmkrebs@chromium.org2012-11-152-2/+15
| | | | | | | | | | | | | | | | | | | | | | When there are upwards of 200 threads in a crashing process, each having an 8KB stack, this can result in a huge, 1.8MB minidump file. So I added a parameter that, if set, can compel the minidump writer to dump less stack. More specifically, if the writer expects to go over the limit (due to the number of threads), then it will dump less of a thread's stack after the first 20 threads. There are two ways to specify the limit, depending on how you write minidumps: 1) If you call WriteMinidump() directly, there's now a version of the function that takes the minidump size limit as an argument. 2) If you use the ExceptionHandler class, the MinidumpDescriptor object you pass to it now has a set_size_limit() method you would call before passing it to the constructor. BUG=chromium-os:31447, chromium:154546 TEST=Wrote a size-limit unittest; Ran unittests Review URL: https://breakpad.appspot.com/487002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1082 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some compiler errors in exception_handler_unittest by casting like crazyted.mielczarek@gmail.com2012-10-151-2/+4
| | | | | | R=digit at https://breakpad.appspot.com/483002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1072 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make Linux signal handler more robust.digit@chromium.org2012-10-092-0/+60
| | | | | | | | | | | | | | | | | | | | | | Breakpad can be used on processes where a mistaken library saves then restores one of our signal handlers with 'signal' instead of 'sigaction'. This loses the SA_SIGINFO flag associated with the Breakpad handler, and in some cases (e.g. Android/ARM kernels), the values of the 'info' and 'uc' parameters that ExceptionHandler::SignalHandler() receives will be completely bogus, leading to a crash when the function is executed (and of course, no minidump generation). To work-around this, have SignalHandler() check the state of the flag. If it is incorrectly unset, re-register with 'sigaction' and the correct flag, then return. The signal will be re-thrown, and this time the function will be called with the correct values. Review URL: https://breakpad.appspot.com/481002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1067 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix merge error from r1055ted.mielczarek@gmail.com2012-10-021-1/+0
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1056 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix linux compile errors for some systems.qsr@chromium.org2012-10-021-9/+10
| | | | | | | | Codereview: https://breakpad.appspot.com/460002/ Patch by: jakerr@google.com git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1055 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Linux build with clang.thestig@chromium.org2012-09-261-0/+1
| | | | | | Review URL: https://breakpad.appspot.com/470002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1052 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow generating minidumps from live process on Linux via ExceptionHandlerted.mielczarek@gmail.com2012-09-183-1/+117
| | | | | | | Original patch by Chris Jones <jones.chris.g@gmail.com> at https://bugzilla.mozilla.org/show_bug.cgi?id=544936 and https://bugzilla.mozilla.org/show_bug.cgi?id=555309 R=mark at https://breakpad.appspot.com/449003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1043 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow adding extra memory regions to minidump on linux/windowsted.mielczarek@gmail.com2012-09-183-3/+117
| | | | | | | A=Bill McCloskey <wmccloskey@mozilla.com>, ted, original patch from https://bugzilla.mozilla.org/show_bug.cgi?id=662646 R=mark at https://breakpad.appspot.com/450002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1041 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add a GetInstructionPointer method to MinidumpExceptionted.mielczarek@gmail.com2012-09-171-42/+3
| | | | | | R=mark at https://breakpad.appspot.com/444003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1039 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow setting a new MinidumpDescriptor on ExceptionHandler, also expose ↵ted.mielczarek@gmail.com2012-09-174-3/+29
| | | | | | | | directory from MinidumpDescriptor R=digit at https://breakpad.appspot.com/452003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1037 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Linux build on Ubuntu 12.04 LTSdigit@chromium.org2012-09-061-2/+2
| | | | | | | | | | | | This fixes the build, which fails because the initialization values for an array of struct sigaction cannot be { 0 }. + Get rid of warning related to unused return value for ftruncate() BUG=492 Review URL: https://breakpad.appspot.com/447002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1027 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Properly redeliver (or don't) signals to the previous handlers.mark@chromium.org2012-09-043-72/+304
| | | | | | | | | | | | | | | | | | | | | | | | If none of the installed ExceptionHandlers handle a signal (their FilterCallbacks or HandlerCallbacks all return false), then the signal should be delivered to the signal handlers that were previously installed. This requires that old_handlers_ become a static vector so that we can restore the handlers in the static HandleSignal. Currently it is also restoring signals in ~ExceptionHandler (if there are no others). This should not be required since our documentation states that a process can only have one ExceptionHandler for which install_handlers is true (and so we get the correct behavior if we simply leave our handlers installed forever), but even the tests themselves violate that. Patch by Chris Hopman <cjhopman@chromium.org> Review URL: https://breakpad.appspot.com/440002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1025 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add custom getcontext() implementation for Android.digit@chromium.org2012-08-311-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This adds a minimalistic implementation of getcontext() for Android/ARM and Android/x86. The provided code is in assembly and only implements the bare minimum required by Breakpad to get the current processor state. Note that: - The FPU state is not saved to the ucontext_t on ARM. (that's actually the main difference with a normal getcontext() implementation). This is normal. On Linux/ARM, such state must be obtained with PTRACE_GETVFPREGS instead. This will be implemented in a future patch. - On x86, only the 'regular' FPU state is saved, to mimic the GLibc/i386 implementation. The state of SSE/SSE2/etc registers is not part of the upstream getcontext() implementation. Review URL: https://breakpad.appspot.com/444002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1024 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the tools and processor build for Androiddigit@chromium.org2012-08-211-2/+2
| | | | | | | | | | | | | | | | | | This small patch allows the build of the tools and processor when targetting Android with the Automake/Autconf build. Not that these necessarily work correctly at the moment, but there is no need for --disable-tools --disable-processor now when using --host=arm-linux-androideabi or --host=i686-linux-android. + Modify android/run-checks.sh to build all binaries with the Automake build. + Tiny fix for --abi=x86 in android/run-checks.sh Review URL: https://breakpad.appspot.com/438002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1018 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Improve Android supportdigit@chromium.org2012-08-212-5/+1
| | | | | | | | | | | | | | | | | | This patch remove many Android-specific #ifdefs from the Breakpad source code. This is achieved by providing "fixed-up" platform headers (e.g. <signal.h> or <sys/user,h>), in the new directory src/common/android/include/, which masks differences between the NDK and GLibc headers. The old "android_link.h" and "android_ucontext.h" are moved and renamed. This also requires putting this directory as the first include path during Android-hosted builds, hence the modification of Makefile.am and configure.ac Review URL: https://breakpad.appspot.com/434002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1017 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix Android build.digit@chromium.org2012-08-202-2/+9
| | | | | | | | | | This patch fixes the Android build, and updates the NDK test application to use the new Linux ExceptionHandler API. + Use string insted of std::string in minidump_descriptor.h Review URL: https://breakpad.appspot.com/433002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1016 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make ExceptionHandler::HandleSignal() public.mark@chromium.org2012-08-102-0/+12
| | | | | | | | | Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://codereview.appspot.com/6461052/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1008 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding a way to create an ExceptionHandler that takes in a file descriptorjcivelli@chromium.org2012-08-095-357/+474
| | | | | | | | | | | | where the minidump should be created, without the need of opening any other file. BUG=None TEST=Run unit-tests. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1007 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Conditionally compiling a unittest - based on whether AddressSanitizer is used. ivan.penkov@gmail.com2012-08-061-0/+7
| | | | | | | | http://breakpad.appspot.com/428002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1004 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculatively back out r989 per http://codereview.chromium.org/10805065/ :mark@chromium.org2012-07-243-67/+1
| | | | | | | | | | | | | | | | | | | | Ted Mielczarek: > You could try backing out r989, although Mozilla has been running with that > patch for months without issue. Me: > src/client/windows/handler/exception_handler.cc in r989 appears to have > formatting problems, an unwanted property change, and no real Breakpad review > history, so maybe we should back it out anyway until the proper process is > followed. NACL Tests nacl_integration failures: http://build.chromium.org/p/chromium/builders/NACL%20Tests/builds/30138 chrome src/native_client/tests/inbrowser_crash_test/crash_dump_tester.py says that the observed failures are a symptom of crash_service.exe itself crashing. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@998 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux: Fix a bunch of clang errors from not handling return values.thestig@chromium.org2012-07-241-5/+8
| | | | | | Review URL: https://breakpad.appspot.com/421002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@995 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow adding extra memory regions to minidump on linux/windowsted.mielczarek2012-07-193-1/+67
| | | | | | A=Bill McCloskey <wmccloskey@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=662646 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@989 4c0a9323-5329-0410-9bdc-e9ce6186880e
* This change allows compiling the google-breakpad code using a global ↵ivan.penkov@gmail.com2012-06-283-21/+23
| | | | | | ::string class instead of std::string. For more details take a look at common/using_std_string.h git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix Android build of client librarydigit@chromium.org2012-06-271-6/+1
| | | | | | | | http://breakpad.appspot.com/401002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@973 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compilation warnings related to unchecked return valuested.mielczarek2012-04-251-1/+8
| | | | | | | Patch by Chris Dearman <chris@mips.com> R=benchan at http://breakpad.appspot.com/377001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@957 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix file descriptor leaks in ExternalDumper testted.mielczarek2012-04-111-0/+2
| | | | | | | Patch by Chris Dearman <chris@mips.com> R=ted at http://breakpad.appspot.com/372002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@951 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Changes to get the breakpad client compiling and running on Android usingmark@chromium.org2012-04-031-12/+19
| | | | | | | | | | | ndk-7b. Patch by Carlos Valdivia <carlosvaldivia@google.com> Review URL: https://breakpad.appspot.com/363001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Avoid setting an alternative stack for signals if there is already oneted.mielczarek2012-02-142-8/+11
| | | | | | | P=Mike Hommey <mh@glandium.org> R=ted at http://codereview.appspot.com/5573054/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@918 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix test addresses to use uintptr_t instead of u_int64_t.benchan@chromium.org2012-01-271-1/+1
| | | | | | | | | | | | | | | | When a variable is used to set (and lookup) MappingInfo's "start_addr" field, it needs to match types -- which is "uintptr_t". When Chrome OS updated the 'make' that's used for building, the 32-bit "char *" had sign-extended when cast up to a u_int64_t -- maybe because pointers were unsigned before and then changed to be signed -- and that caused the address lookup to fail. BUG=chromium-os:25355 TEST=Ran Breakpad unittests A=mkrebs@chromium.org Review URL: http://breakpad.appspot.com/345001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@908 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use sys_prctl instead of prctl.thestig@chromium.org2012-01-241-8/+5
| | | | | | | http://breakpad.appspot.com/339002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@906 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct compilation warning.qsr@chromium.org2011-11-231-27/+29
| | | | | | | | | 1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison. 2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests. Review URL: http://breakpad.appspot.com/328001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix problem with not NULL terminating mapping name.kmixter@chromium.org2011-11-091-1/+2
| | | | | | | BUG=453 Review URL: http://breakpad.appspot.com/323001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@881 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add some headers necessary to build the Linux client code with the Android ↵ted.mielczarek@gmail.com2011-05-311-0/+2
| | | | | | | | NDK r5 P=Alon Zakai <azakai@mozilla.com>, R=ted git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@790 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add trusted checkjessicag.feedback@gmail.com2011-03-221-2/+7
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@783 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix clang warning / miscompile.mmentovai2011-01-241-2/+2
| | | | | | | | | Patch by Nico Weber <thakis@chromium.org> Review URL: http://breakpad.appspot.com/256001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@760 4c0a9323-5329-0410-9bdc-e9ce6186880e
* allow passing info about known memory mappings to MinidumpWriter and ↵ted.mielczarek2010-12-133-3/+127
| | | | | | | | ExceptionHandler r=thestig at http://breakpad.appspot.com/242001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@741 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Delete an old Makefile and fix lots of lint errors.thestig@chromium.org2010-11-081-5/+5
| | | | | | Review URL: http://breakpad.appspot.com/225001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@727 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add support for building the Linux client code using the Android NDKted.mielczarek2010-10-203-14/+31
| | | | | | r=mwu at http://breakpad.appspot.com/212001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@716 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Write a window of memory around the instruction pointer from the crashing ↵ted.mielczarek2010-09-232-1/+315
| | | | | | | | thread to the minidump on OS X. R=nealsid at http://breakpad.appspot.com/200001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@699 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Write a window of memory around the instruction pointer from the crashing ↵ted.mielczarek2010-09-171-0/+123
| | | | | | | | thread to the minidump on Linux. R=nealsid at http://breakpad.appspot.com/194001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@693 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add a free() to ExceptionHandlerTest.ChildCrash.thestig@chromium.org2010-09-161-0/+1
| | | | | | Review URL: http://breakpad.appspot.com/193001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@687 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Import linux_syscall_support.h from linux-syscall-support.googlecode.com ↵thestig@chromium.org2010-09-152-3/+3
| | | | | | | | instead of using our own copy. Review URL: http://breakpad.appspot.com/192001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@686 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a handful of comment spelling errors (Issue 385)jessicag.feedback@gmail.com2010-09-091-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@682 4c0a9323-5329-0410-9bdc-e9ce6186880e