external/google-breakpad.git
8 hours agoChange the way function and public symbols are obtained to use the findChildren DIA... master
wfh@chromium.org [Wed, 16 Apr 2014 22:50:28 +0000 (22:50 +0000)]
Change the way function and public symbols are obtained to use the findChildren DIA function.

This has a substantial performance improvement over using the getSymbolsByAddr iterator, especially on certain 64bit DLLS.  e.g. Time to process chrome_child.dll drops from 51 minutes to 21 secs.

Note: new test data looks different because the ordering of lines is no longer by memory address.  This does not affect processing.  The test data has been manually compared to old data and matches (except additional PUBLIC symbols).  Also, INFO lines are omitted because the source executable files are not checked in, so they are unavailable.

R=ivanpe@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1574002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1316 4c0a9323-5329-0410-9bdc-e9ce6186880e

15 hours agoAllow symupload to upload to multiple URLs on the same command line.
wfh@chromium.org [Wed, 16 Apr 2014 16:03:57 +0000 (16:03 +0000)]
Allow symupload to upload to multiple URLs on the same command line.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1554002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1315 4c0a9323-5329-0410-9bdc-e9ce6186880e

36 hours agoLimit the workaround in r1313 to Android only.
thestig@chromium.org [Tue, 15 Apr 2014 18:29:15 +0000 (18:29 +0000)]
Limit the workaround in r1313 to Android only.

BUG=579
R=rmcilroy@chromium.org, vapier@chromium.org

Review URL: https://breakpad.appspot.com/1564002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1314 4c0a9323-5329-0410-9bdc-e9ce6186880e

45 hours ago[Android]: Fix hang in CreateChildCrash() on Android.
rmcilroy@chromium.org [Tue, 15 Apr 2014 10:07:50 +0000 (10:07 +0000)]
[Android]: Fix hang in CreateChildCrash() on Android.

After r1299, the LinuxCoreDumperTest::VerifyDumpWithMultipleThreads and
ElfCoreDumpTest::ValidCoreFile would both hang on Android.  This appears to be due to the tkill
signal not being recieved by the thread which is meant to crash, even though tkill returns 0.
This CL retries sending the tkill signal multiple times, which prevents the Hang.

BUG=579
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1524002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1313 4c0a9323-5329-0410-9bdc-e9ce6186880e

45 hours agoUpdate offset of fpregs_mem.
rmcilroy@chromium.org [Tue, 15 Apr 2014 09:52:37 +0000 (09:52 +0000)]
Update offset of fpregs_mem.

Based on testing in the emulator.

BUG=346626
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1544002

Patch from Anton Carver <anton@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1312 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 days agoAdd x64 version of getcontext.
rmcilroy@chromium.org [Fri, 11 Apr 2014 16:09:12 +0000 (16:09 +0000)]
Add x64 version of getcontext.

Assembly code is derived in part from code in libunwind.
Code tested on desktop linux (Android testing pending emulation
support).

BUG=346626
R=dannyb@google.com, thestig@chromium.org

Review URL: https://breakpad.appspot.com/1454002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1311 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 days agoFill in CPU info in mini-dump for Arm64.
rmcilroy@chromium.org [Fri, 11 Apr 2014 14:41:14 +0000 (14:41 +0000)]
Fill in CPU info in mini-dump for Arm64.

Adds Arm64 varients of CPUFillThreadInfo and CPUFillFromUContext and
WriteCPUInformation for the Linux/Android client.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1464002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1310 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 days agoAdding support for 64-bit Windows modules to ms_symbol_server_converter.
ivan.penkov@gmail.com [Thu, 10 Apr 2014 17:54:52 +0000 (17:54 +0000)]
Adding support for 64-bit Windows modules to ms_symbol_server_converter.

As part of that:
 - Updated MSSymbolServerConverter to also download the executable files from the symbol server and pass them to the PDBSourceLineWriter as it is required for successful conversion of symbols for 64-bit modules.
 - Added a .gyp file and target for the ms_symbol_server_converter library.
 - Updated PDBSourceLineWriter to allow executable files to be in locations different from the locations of the PDB files.
 - Minor style issue:
    * #define guards.
    * No space before ')' and after '('.

R=mark@chromium.org, wfh@chromium.org

Review URL: https://breakpad.appspot.com/1434002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1309 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 days agoMoving directory 'build' one level up as it collides with a file named 'BUILD' which...
ivan.penkov@gmail.com [Thu, 10 Apr 2014 17:37:20 +0000 (17:37 +0000)]
Moving directory 'build' one level up as it collides with a file named 'BUILD' which happens to be in that same location in the Google source depot.

R=chrisha@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1504002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1308 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 days agoIncrease Breakpad's signal handler stack size.
rmcilroy@chromium.org [Wed, 9 Apr 2014 17:35:44 +0000 (17:35 +0000)]
Increase Breakpad's signal handler stack size.

Some unittests fail on Android (both on Arm and Arm64) without this stack
size increase.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1484002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1307 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 days agoFix aarch64 ucontext layout on Android
rmcilroy@chromium.org [Wed, 9 Apr 2014 09:08:19 +0000 (09:08 +0000)]
Fix aarch64 ucontext layout on Android

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1444002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1306 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 days agoAdd Arm64 support to breakpad unittests.
rmcilroy@chromium.org [Tue, 8 Apr 2014 17:36:11 +0000 (17:36 +0000)]
Add Arm64 support to breakpad unittests.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1424002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1305 4c0a9323-5329-0410-9bdc-e9ce6186880e

13 days agoMove build configuration to root of repository.
chrisha@chromium.org [Thu, 3 Apr 2014 18:34:24 +0000 (18:34 +0000)]
Move build configuration to root of repository.

This is in preparation for creating GYP build files for each platform.

BUG=https://code.google.com/p/google-breakpad/issues/detail?id=575
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1414002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1304 4c0a9323-5329-0410-9bdc-e9ce6186880e

13 days agoFix ElfCoreDumpTest.ValidCoreFile unit test.
benchan@chromium.org [Thu, 3 Apr 2014 16:50:06 +0000 (16:50 +0000)]
Fix ElfCoreDumpTest.ValidCoreFile unit test.

The ElfCoreDumpTest.ValidCoreFile unit test assumed that the number of
NT_FPREGSET / NT_PRXFPREG notes in the core dump file equals to the number of
threads of the crashed process. This assumption isn't always true as the kernel
skips filling the NT_FPREGSET / NT_PRXFPREG note of a thread if the FPU state
isn't available. The kernel indicates the availability of NT_FPREGSET /
NT_PRXFPREG via the pr_fpvalid field of the NT_PRSTATUS note. This CL modifies
the ElfCoreDumpTest.ValidCoreFile unit test to verify the number of NT_FPREGSET
and NT_PRXFPREG notes based on the pr_fpvalid field of the NT_PRSTATUS notes.

BUG=577
TEST=Run unit tests on x86 and x86_64 Linux platform.
R=vapier@chromium.org

Review URL: https://breakpad.appspot.com/1404002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1303 4c0a9323-5329-0410-9bdc-e9ce6186880e

13 days agoAdd Arm64 version of breakpad_getcontext for Android.
rmcilroy@chromium.org [Thu, 3 Apr 2014 13:15:37 +0000 (13:15 +0000)]
Add Arm64 version of breakpad_getcontext for Android.

This CL adds breakpad_getcontext support for Arm64 to Android. The assembly
is based on getcontext.S in glibc.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1384002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1302 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoFirst cut at adding arm64 Linux / Android support to Breakpad.
rmcilroy@chromium.org [Wed, 2 Apr 2014 23:12:40 +0000 (23:12 +0000)]
First cut at adding arm64 Linux / Android support to Breakpad.

This is an initial attempt to add Arm64 (aarch64) support to Breakpad for
Linux / Android platforms.  This CL adds the Arm64 data structures, but does
not yet implement the Android getcontext support or CPUFillFromThreadInfo /
CPUFillFromUContext.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1354002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1301 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoRemove some unecessary Android system header definitions.
rmcilroy@chromium.org [Wed, 2 Apr 2014 23:02:31 +0000 (23:02 +0000)]
Remove some unecessary Android system header definitions.

Newer NDKs include some additional headers needed by Breakpad, so we can remove these redefinitions.

BUG=358831,335641,354405
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1374002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1300 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agofix races in CrashGenerator::CreateChildCrash
vapier@chromium.org [Wed, 2 Apr 2014 22:55:12 +0000 (22:55 +0000)]
fix races in CrashGenerator::CreateChildCrash

The current CreateChildCrash logic is racy when it comes to creating a
crash dump for two reasons:

The main thread that calls kill() on a different thread is guaranteed
the signal will be *queued* when it returns, but not *delivered*.  If
the kernel doesn't automatically schedule the receiving thread, but
instead lets the main thread run to the exit() call, then the signal
never triggers a coredump and the whole process simply exits.

The main thread is using kill() to try to deliver a signal to a
specific thread, but that function is for sending signals to a
process.  That means the kernel is free to deliver the signal to
any thread in the process and not just the one requested.  This
manifests itself as the pr_pid in the coredump not being the one
expected.  Instead, we must use tkill() with the tid (which we
already took care of gathering) to deliver to a specific thread.

These are a lot easier to see on a UMP system as contention is heavier.

BUG=chromium:207918
TEST=`dumper_unittest` still passes, and doesn't flake out in a UMP system
TEST=`linux_client_unittest` still passes
R=benchan@chromium.org

Review URL: https://breakpad.appspot.com/1304005

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1299 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoUpdate GYP dependency to r1886.
chrisha@chromium.org [Wed, 2 Apr 2014 21:34:42 +0000 (21:34 +0000)]
Update GYP dependency to r1886.

This updates both svn:external and DEPS. This version of GYP is able to produce VS2013 project files.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1394002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1298 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoUpdate DEPS to bring in gtest, gmock and GYP.
chrisha@chromium.org [Wed, 2 Apr 2014 20:18:55 +0000 (20:18 +0000)]
Update DEPS to bring in gtest, gmock and GYP.

BUG=575
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1304004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1297 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoAdd .gitignore file.
chrisha@chromium.org [Wed, 2 Apr 2014 19:41:40 +0000 (19:41 +0000)]
Add .gitignore file.

BUG=
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1314003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1296 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoTerminating FileID path when at maximum length. (Coverity)
thestig@chromium.org [Tue, 1 Apr 2014 20:18:53 +0000 (20:18 +0000)]
Terminating FileID path when at maximum length. (Coverity)

If FileID was constructed with a path that was >= PATH_MAX then path_ was not terminated resulting in a possible buffer overrun when reading.

BUG=573
A=cmumford@chromium.org
Original code review: https://breakpad.appspot.com/1324002/

R=cmumford@chromium.org

Review URL: https://breakpad.appspot.com/1334002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1295 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoGoogleCrashdumpUploader would leak instances of LibcurlWrapper (Coverity)
thestig@chromium.org [Tue, 1 Apr 2014 20:18:23 +0000 (20:18 +0000)]
GoogleCrashdumpUploader would leak instances of LibcurlWrapper (Coverity)

The GoogleCrashdumpUploader would create, but never destroy it's instance of LibcurlWrapper.

BUG=574
A=cmumford@chromium.org
Original code review: https://breakpad.appspot.com/1314002/

R=cmumford@chromium.org

Review URL: https://breakpad.appspot.com/1344002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1294 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoMake ARM64 detection consistent in chromium.
mark@chromium.org [Tue, 1 Apr 2014 18:20:36 +0000 (18:20 +0000)]
Make ARM64 detection consistent in chromium.

This is to uniform ARM64 detection code in chromium.
Use only __aarch64__ and don't look for __arm64__ at all.

Patch by Primiano Tucci <primiano@chromium.org>

BUG=chromium:354405, chromium:358092

Review URL: https://breakpad.appspot.com/1304002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1293 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoIgnore warning 4702 to avoid unreachable code error on
wfh@chromium.org [Wed, 26 Mar 2014 21:02:12 +0000 (21:02 +0000)]
Ignore warning 4702 to avoid unreachable code error on
VS2013 stl when compiling with _HAS_EXCEPTIONS=0

See also https://crbug.com/346399 for background.

BUG=540
R=mark@chromium.org, thestig@chromium.org
TEST=update gyp to HEAD, generate MSVS2013 build files, verify breakpad compiles in Release.

Review URL: https://breakpad.appspot.com/1284002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1292 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoCheck in new Windows binaries.
wfh@chromium.org [Wed, 26 Mar 2014 20:45:52 +0000 (20:45 +0000)]
Check in new Windows binaries.

These binaries include recent changes to pdb_source_line_writer for emitting
STACK CFI lines for 64bit PDBs. They were built using the GYP build files,
MSVS 2013 and DIA SDK 12.0.

R=mark@chromium.org, siggi@chromium.org

Review URL: https://breakpad.appspot.com/1294002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1291 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoAdd support for Win64 stack unwind data as STACK CFI
wfh@chromium.org [Mon, 24 Mar 2014 12:12:17 +0000 (12:12 +0000)]
Add support for Win64 stack unwind data as STACK CFI

This is a copy of https://breakpad.appspot.com/1264002/ where code review took place.

See https://bugzilla.mozilla.org/show_bug.cgi?id=548035 and https://code.google.com/p/chromium/issues/detail?id=115922

Credit to Mikhail I. Izmestev <izmmishao5@gmail.com> for original patch in https://breakpad.appspot.com/345002/

BUG=572
TEST=Run dump_syms_unittest after compiling dump_syms_regtest.cc with x64 toolchain
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1274002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1290 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 weeks agoFix crash in Windows CrashGenerationServer from r1274.
thestig@chromium.org [Wed, 19 Mar 2014 19:12:56 +0000 (19:12 +0000)]
Fix crash in Windows CrashGenerationServer from r1274.

R=cdn@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1254002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1289 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 weeks agoFix a bug in BreakpadController that prevented multiple report uploads per call to...
ivan.penkov@gmail.com [Wed, 19 Mar 2014 18:58:36 +0000 (18:58 +0000)]
Fix a bug in BreakpadController that prevented multiple report uploads per call to sendStoredCrashReports.

Submitting this patch on behalf of Asher Segel-Brown.

R=blundell@chromium.org, mark@chromium.org, qsr@chromium.org

Review URL: https://breakpad.appspot.com/1234002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1288 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 weeks agoTrim unintentional whitespace and fix style nits
thestig@chromium.org [Tue, 18 Mar 2014 18:06:10 +0000 (18:06 +0000)]
Trim unintentional whitespace and fix style nits

Original review: https://breakpad.appspot.com/1204002/
A=mdempsky@chromium.org
R=mdempsky@chromium.org

Review URL: https://breakpad.appspot.com/1244002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1287 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 weeks agoFixing compiler warnings:
ivan.penkov@gmail.com [Fri, 28 Feb 2014 10:21:20 +0000 (10:21 +0000)]
Fixing compiler warnings:
 - Building Breakpad in Xcode with arm64 architecture.
 - iOS
Patches provided by: Ian Hickson and Greg Vance.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1184003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1286 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 weeks agoRenaming file COPYING to LICENSE and appending the disclaimer from src/common/convert...
ivan.penkov@gmail.com [Thu, 27 Feb 2014 19:23:16 +0000 (19:23 +0000)]
Renaming file COPYING to LICENSE and appending the disclaimer from src/common/convert_UTF.h to LICENSE.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1174003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1285 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 weeks agoInitialize file descriptors to -1, not 0, in MachoWalker.
mark@chromium.org [Wed, 26 Feb 2014 18:59:48 +0000 (18:59 +0000)]
Initialize file descriptors to -1, not 0, in MachoWalker.

R=ivan.penkov@gmail.com

Review URL: https://breakpad.appspot.com/1174002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1284 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 weeks agoUpdate GTM and enable -Wundef and strict C++11 flags.
dmaclach [Wed, 26 Feb 2014 16:14:04 +0000 (16:14 +0000)]
Update GTM and enable -Wundef and strict C++11 flags.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1283 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 weeks agoFixup breakpad compile for Xcode 5.1 iOS release
dmaclach [Mon, 24 Feb 2014 21:35:40 +0000 (21:35 +0000)]
Fixup breakpad compile for Xcode 5.1 iOS release

(https://breakpad.appspot.com/1154002/)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1282 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 weeks agoFix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS.
dmaclach [Tue, 18 Feb 2014 22:52:02 +0000 (22:52 +0000)]
Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1281 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 weeks agoWhen the Breakpad.h header gets compiled by standard C compilers
dmaclach [Tue, 18 Feb 2014 21:34:43 +0000 (21:34 +0000)]
When the Breakpad.h header gets compiled by standard C compilers
(instead of C++) it gets upset about the default argument. Instead of
using a default argument I split the function up into two separate
functions.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1280 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoMake Linux ExceptionHandler::HandleSignal public
ted.mielczarek@gmail.com [Wed, 5 Feb 2014 12:11:48 +0000 (12:11 +0000)]
Make Linux ExceptionHandler::HandleSignal public
A=Jed Davis <jld@mozilla.com> R=ted at https://breakpad.appspot.com/1114003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1279 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoCreate a new tool to upload Mac system library symbols.
rsesek@chromium.org [Mon, 3 Feb 2014 22:52:49 +0000 (22:52 +0000)]
Create a new tool to upload Mac system library symbols.

R=andybons@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1124002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1278 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoSupport statically-linked libcurl for HTTP uploads in Linux
mattdr.breakpad@gmail.com [Wed, 29 Jan 2014 20:34:07 +0000 (20:34 +0000)]
Support statically-linked libcurl for HTTP uploads in Linux

https://breakpad.appspot.com/1064002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1277 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoWindows: Fix 64-bit compitation of crash_generation_app.
thestig@chromium.org [Tue, 21 Jan 2014 19:22:37 +0000 (19:22 +0000)]
Windows: Fix 64-bit compitation of crash_generation_app.

BUG=560
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1104002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1276 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoFix missing semi-colons from r1267.
thestig@chromium.org [Fri, 17 Jan 2014 23:20:24 +0000 (23:20 +0000)]
Fix missing semi-colons from r1267.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1094002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1275 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoRefactor the Windows MinidumpGenerator interface to get rid of the overloads when...
cdn@chromium.org [Fri, 17 Jan 2014 22:39:11 +0000 (22:39 +0000)]
Refactor the Windows MinidumpGenerator interface to get rid of the overloads when generating dumps.
All required params are now passed to the constructor and the various options are set through new methods.

BUG=N/A
TEST=Existing minidump generation tests
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1074002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1274 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoFix VS project generation for the crash generation app.
cdn@chromium.org [Fri, 17 Jan 2014 21:57:47 +0000 (21:57 +0000)]
Fix VS project generation for the crash generation app.

BUG=N/A
TEST=N/A
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1084002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1273 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoSubmitting on bahalf of Michele Aiello.
ivan.penkov@gmail.com [Mon, 13 Jan 2014 19:30:06 +0000 (19:30 +0000)]
Submitting on bahalf of Michele Aiello.

Fix Xcode 5.1 compilation issues.
Moving a couple of variable under #ifdef to avoid build warnings.

R=blundell@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1054002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1272 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoAdd -[BreakpadController setParametersToAddAtUploadTime:] for iOS.
blundell@chromium.org [Mon, 13 Jan 2014 10:40:07 +0000 (10:40 +0000)]
Add -[BreakpadController setParametersToAddAtUploadTime:] for iOS.

This provides the ability to add server parameters to a crash report when the
report is uploaded.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=558
R=blundell@chromium.org

Review URL: https://breakpad.appspot.com/974002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1271 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoDon't do work inside assert(). Ever.
mark@chromium.org [Fri, 10 Jan 2014 19:54:20 +0000 (19:54 +0000)]
Don't do work inside assert(). Ever.

The Mac crash key manipulation code was intended to be thread-safe through the
provision of a mutex. The mutex operations were done inside an assert().
assert() is a no-op in NDEBUG (release) builds. Therefore, in release builds,
these operations were occurring without being protected by any mutex at all,
and were nowhere near thread-safe.

BUG=chromium:331268
R=rsesek@chromium.org

Review URL: https://breakpad.appspot.com/1034002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1270 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFix #include order from r1268.
mark@chromium.org [Fri, 10 Jan 2014 19:53:33 +0000 (19:53 +0000)]
Fix #include order from r1268.

R=ted.mielczarek@gmail.com

Review URL: https://breakpad.appspot.com/1044002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1269 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFix compilation with macos-target=10.9
ted.mielczarek@gmail.com [Fri, 3 Jan 2014 12:32:55 +0000 (12:32 +0000)]
Fix compilation with macos-target=10.9
A=Nomis101, R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=952623

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1268 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoWindows: Fix remaining level 4 warnings.
thestig@chromium.org [Wed, 18 Dec 2013 22:43:56 +0000 (22:43 +0000)]
Windows: Fix remaining level 4 warnings.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/954002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1267 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoUse a proper ignore_result() to fix a ftruncate warn_unused_result warning with GCC...
thestig@chromium.org [Wed, 18 Dec 2013 19:52:36 +0000 (19:52 +0000)]
Use a proper ignore_result() to fix a ftruncate warn_unused_result warning with GCC 4.8.

BUG=492
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/944003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1266 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoSwitch scoped_ptr.h to a compatible google3 implementation.
thestig@chromium.org [Wed, 18 Dec 2013 19:49:55 +0000 (19:49 +0000)]
Switch scoped_ptr.h to a compatible google3 implementation.

This is Chromium's base/memory/scoped_ptr.h at r98718, which split off
from the google3 version at a later point than Breakpad's copy. It is a
drop in replacement and the only changes are:
- removal of WARN_UNUSED_RESULT.
- moving it into the google_breakpad namespace.

BUG=534
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/964002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1265 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFix warnings from the Windows build.
thestig@chromium.org [Tue, 17 Dec 2013 22:21:40 +0000 (22:21 +0000)]
Fix warnings from the Windows build.

These warnings are fatal in my GYP-generated debug build.
The warnings can be seen on Linux/Mac with -Wshorten-64-to-32.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/944002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1264 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoRun svn propdel svn:executable on source code files.
thestig@chromium.org [Tue, 17 Dec 2013 21:40:50 +0000 (21:40 +0000)]
Run svn propdel svn:executable on source code files.

Review URL: https://breakpad.appspot.com/934002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1263 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFix error r1258.
thestig@chromium.org [Tue, 17 Dec 2013 19:04:11 +0000 (19:04 +0000)]
Fix error r1258.

BUG=556
R=cdn@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/904004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1262 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoMaking the Mac build of crash_report work again after the last SVN sync. This include...
ivan.penkov@gmail.com [Tue, 17 Dec 2013 00:10:25 +0000 (00:10 +0000)]
Making the Mac build of crash_report work again after the last SVN sync. This includes correction of a method definition signature and adding missing code files to the project.

I'm commiting this on behalf of Thomas Schweitzer.
Review URL: https://breakpad.appspot.com/914002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1261 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoFix gcc vs clang cpuid.h discrepency.
thestig@chromium.org [Sat, 14 Dec 2013 19:17:42 +0000 (19:17 +0000)]
Fix gcc vs clang cpuid.h discrepency.

For r1254, gcc defines bit_FXSAVE while clang defines bit_FXSR.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/924002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1260 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoMisc Android-related fixes.
digit@chromium.org [Fri, 13 Dec 2013 16:49:11 +0000 (16:49 +0000)]
Misc Android-related fixes.

- src/common/android/testing/mkdtemp.h:
  Fixes a compilation error when using the (recent) NDK r9b,
  see comments in the source file for details.

- android/test-driver, Makefile.am, Makefile.in:
  Autotools 1.12 changed the way tests are run during "make check"
  so add a new "custom test driver" to run tests on Android, and
  modify Makefile.am / Makefile.in accordingly. Otherwise,
  'make check' tried to run the tests on the host.

- android/test-shell.sh:
  Allow several tests to run in parallel on the device, by
  creating a custom test directory for each test process.
  This allows running "make check -j8" reliably.

- src/common/linux/file_id_unittest.cc:
  Disable the SelfStrip test on Android, since it assumes a 'strip'
  executable is available on the target system where the test runs.

BUG=NONE
R=mark@chromium.org, ted.mielczarek@gmail.com
TEST=android/run-checks.sh --ndk-dir=/path/to/android-ndk-r9b

Review URL: https://breakpad.appspot.com/904003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1259 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoExpose the ability to supply additional user streams in the windows dump generator.
cdn@chromium.org [Thu, 12 Dec 2013 20:04:42 +0000 (20:04 +0000)]
Expose the ability to supply additional user streams in the windows dump generator.

BUG=N/A
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/894002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1258 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoRemove usage of gDebugLog and DEBUGLOG from Mac and iOS client code.
altse@chromium.org [Thu, 12 Dec 2013 19:58:00 +0000 (19:58 +0000)]
Remove usage of gDebugLog and DEBUGLOG from Mac and iOS client code.

The inconsistent and duplicated references to gDebugLog caused
problems building on iOS and the current logging implementation
had little utility because it was never activated in debug builds.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1257 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAdd -[BreakpadController resetConfiguration] for iOS.
blundell@chromium.org [Thu, 12 Dec 2013 14:52:37 +0000 (14:52 +0000)]
Add -[BreakpadController resetConfiguration] for iOS.

Add a resetConfiguration method to BreakpadController for iOS. The new method
resets the controller configuration to its initial value, which is the
infoDictionary of the bundle of the application.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=554

Review URL: https://breakpad.appspot.com/904002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1256 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agodisable unittests under ASAN that use memory crashes
vapier@chromium.org [Wed, 11 Dec 2013 05:38:34 +0000 (05:38 +0000)]
disable unittests under ASAN that use memory crashes

There are a bunch of tests that use invalid memory acesses (on purpose)
to trigger a crash so that we can detect things are dumped correctly.
When we run under ASAN, it catches those accesses and the breaks the
testing flow.

For now, use the existing ADDRESS_SANITIZER symbol to disable more tests.
Ideally we'd use a compile-time attribute to disable ASAN on a few funcs,
but that seems to be broken atm.

BUG=chromium:293519
BUG=chromium:304575
TEST=ran unittests under ASAN and they now pass
TEST=ran unittests w/out asan/clang and they still pass
R=benchan@chromium.org

Review URL: https://breakpad.appspot.com/884002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1255 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAddress additional comments from r1248. Fix the register to check and fix some style...
thestig@chromium.org [Tue, 10 Dec 2013 21:17:12 +0000 (21:17 +0000)]
Address additional comments from r1248. Fix the register to check and fix some style nits.

BUG=495
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/834003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1254 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoConditionalize use of <cpuid.h> header
mcgrathr@chromium.org [Tue, 10 Dec 2013 18:25:45 +0000 (18:25 +0000)]
Conditionalize use of <cpuid.h> header

This header only exists for x86 environments, but was included
unconditionally.  That broke the builds for all non-x86 environments.

R=mark@chromium.org
BUG=

Review URL: https://breakpad.appspot.com/824003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1253 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoautoreconf -f -i
ted.mielczarek@gmail.com [Tue, 10 Dec 2013 17:53:50 +0000 (17:53 +0000)]
autoreconf -f -i

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1252 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoUse AM_MAINTAINER_MODE so configure supports --enable-maintainer-mode
ted.mielczarek@gmail.com [Tue, 10 Dec 2013 12:28:11 +0000 (12:28 +0000)]
Use AM_MAINTAINER_MODE so configure supports --enable-maintainer-mode
A=mcgrathr
R=bradnelson at https://breakpad.appspot.com/864003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1251 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agocheck for and enable Large File Support automatically
vapier@chromium.org [Tue, 10 Dec 2013 06:28:08 +0000 (06:28 +0000)]
check for and enable Large File Support automatically

If you try to process a file using a 32bit build that is larger than
2GiB in size, the linux kernel will reject things:
$ strace -eopen dump_syms ./chrome ./ > chrome.sym
...
open(".//chrome.debug", O_RDONLY)       = -1 EOVERFLOW (Value too large for defined data type)

So let's use the existing autoconf macro to check for and enable support
as need be.

We have to shift the existing m32 logic up to before we start doing
feature test macros though otherwise a simple configure won't work:
$ ./configure --enable-m32
This is because it first tests LFS and such w/out the -m32 flags.

BUG=chromium:266064
TEST=`./configure --enable-m32 && make && make check` passes
R=benchan@chromium.org

Review URL: https://breakpad.appspot.com/619002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1250 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoFix Windows release build error due to unreferenced variables.
thestig@chromium.org [Mon, 9 Dec 2013 21:59:48 +0000 (21:59 +0000)]
Fix Windows release build error due to unreferenced variables.

BUG=544
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/874002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1249 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAdd MMX detection when getting registers in Linux.
thestig@chromium.org [Mon, 9 Dec 2013 20:22:43 +0000 (20:22 +0000)]
Add MMX detection when getting registers in Linux.

For CPUs that don't support the MMX instruction set, such pre-Pentium III or industrial x86 embedded PCs, the minidump fails when it tries to retrieve MMX specific registers.

This patch adds MMX detection for that call.

Tested on Ubuntu 12.04 with i686, and on a custom Linux distro on a Vortex86DX microcontroller.

Original review: https://breakpad.appspot.com/455002/
A=aras.vaichas
BUG=495

Review URL: https://breakpad.appspot.com/864002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1248 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoBack out r1244
mark@chromium.org [Mon, 9 Dec 2013 14:08:10 +0000 (14:08 +0000)]
Back out r1244

------------------------------------------------------------------------
r1244 | mark@chromium.org | 2013-12-05 18:13:18 -0500 (Thu, 05 Dec 2013) | 7 lines

Avoid redefinition of global static debug flag and remove unneeded
#import "GTMDefines.h

Patch by Alistair Tse <altse@chromium.org>

Review URL: https://breakpad.appspot.com/824002

------------------------------------------------------------------------

Breakage documented at https://breakpad.appspot.com/824002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1247 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoSwitch armv7 setting to arm_version==7.
mark@chromium.org [Sun, 8 Dec 2013 19:28:36 +0000 (19:28 +0000)]
Switch armv7 setting to arm_version==7.

Patch by Mostyn Bramley-Moore <mostynb@opera.com>

BUG=chromium:234135

Review URL: https://breakpad.appspot.com/844002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1246 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAdd include guards and avoid redefinition of false/true in convert_UTF.
mark@chromium.org [Thu, 5 Dec 2013 23:16:03 +0000 (23:16 +0000)]
Add include guards and avoid redefinition of false/true in convert_UTF.

Patch by Alistair Tse <altse@chromium.org>

Review URL: https://breakpad.appspot.com/834002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1245 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAvoid redefinition of global static debug flag and remove unneeded
mark@chromium.org [Thu, 5 Dec 2013 23:13:18 +0000 (23:13 +0000)]
Avoid redefinition of global static debug flag and remove unneeded
#import "GTMDefines.h

Patch by Alistair Tse <altse@chromium.org>

Review URL: https://breakpad.appspot.com/824002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1244 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoDo not read CFI section when not outputing CFI information.
qsr@chromium.org [Wed, 4 Dec 2013 14:05:23 +0000 (14:05 +0000)]
Do not read CFI section when not outputing CFI information.

This revert revision 1182 and fix setting the module load address
whether CFI information is needed or not.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/641002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1243 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoFix unused method warning.
ivan.penkov@gmail.com [Tue, 3 Dec 2013 22:27:01 +0000 (22:27 +0000)]
Fix unused method warning.
Review URL: https://breakpad.appspot.com/814002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1242 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoFixing several instances of wrong printf format specifiers.
ivan.penkov@gmail.com [Tue, 3 Dec 2013 21:13:59 +0000 (21:13 +0000)]
Fixing several instances of wrong printf format specifiers.
Review URL: https://breakpad.appspot.com/794002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1241 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAdd missing #include of eintr_wrapper.h to auto_testfile.h. Since it's
mark@chromium.org [Tue, 3 Dec 2013 19:01:17 +0000 (19:01 +0000)]
Add missing #include of eintr_wrapper.h to auto_testfile.h. Since it's
Linux-specific, shuffle the files around a bit.

(The implementation is actually POSIX-specific, but it's currently only used
on Linux.)

R=blundell@chromium.org

Review URL: https://breakpad.appspot.com/804002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1240 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoDon't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.
mark@chromium.org [Tue, 3 Dec 2013 14:12:08 +0000 (14:12 +0000)]
Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.

It is incorrect to wrap close in HANDLE_EINTR on Linux.

Unnecessary #includes of eintr_wrapper.h are also removed. The variable naming
within the macro is also updated per Chromium r178174.

einter_wrapper.h contains a non-mechanical change. Mechanical changes were
generated by running:

sed -E -i '' \
    -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \
    -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \
    -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \
    $(grep -rl HANDLE_EINTR.*close . --exclude-dir=.svn)

sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \
    $(grep -EL '(HANDLE|IGNORE)_EINTR' \
        $(grep -Elr '#include.*eintr_wrapper\.h"' . --exclude-dir=.svn))

BUG=chromium:269623
R=ted.mielczarek@gmail.com

Review URL: https://breakpad.appspot.com/784002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1239 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoRe-enable ios_exception_minidump_generator being built on non-ARM.
blundell@chromium.org [Mon, 2 Dec 2013 16:02:48 +0000 (16:02 +0000)]
Re-enable ios_exception_minidump_generator being built on non-ARM.

This file gets built on x86 as part of building Chromium for the iOS simulator,
which I had forgotten in the course of https://breakpad.appspot.com/664002/.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/774002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1238 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoIn iOS, BREAKPAD_OUTPUT_DUMP_FILE value contains a malformed full path to the dump...
qsr@chromium.org [Tue, 26 Nov 2013 10:38:55 +0000 (10:38 +0000)]
In iOS, BREAKPAD_OUTPUT_DUMP_FILE value contains a malformed full path to the dump file.

The std::string dumpFilename already contains the full pathname to the dump file.  Appending it to the dumpDirAsNSString creates a string with the path portion duplicated, e.g.:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

Instead of this:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

R=markus@chromium.org, qsr@chromium.org

Review URL: https://breakpad.appspot.com/744002

Patch from Akiva <scirsw@gmail.com>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1237 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoProcess minidumps generated on ARM64 in iOS apps.
mark@chromium.org [Sat, 23 Nov 2013 01:45:20 +0000 (01:45 +0000)]
Process minidumps generated on ARM64 in iOS apps.

Patch by Colin Blundell <blundell@chromium.org>

BUG=542

Review URL: https://breakpad.appspot.com/704002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1236 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoGenerate minidumps for 64-bit ARM apps on iOS.
mark@chromium.org [Thu, 21 Nov 2013 17:44:57 +0000 (17:44 +0000)]
Generate minidumps for 64-bit ARM apps on iOS.

Adds an ARM64-specific definition of MDRawContext and support for writing out a
minidump when running on ARM64. Additionally, extends the iOS minidump generator
for NSExceptions to work on ARM64 as well as ARM.

Patch by Colin Blundell <blundell@chromium.org>

BUG=542

Review URL: https://breakpad.appspot.com/664002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1235 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoProvide BreakpadGetCrashReportCount() and -[BreakpadController
mark@chromium.org [Wed, 20 Nov 2013 16:34:13 +0000 (16:34 +0000)]
Provide BreakpadGetCrashReportCount() and -[BreakpadController
getCrashReportCount:]

This provides the ability for clients to query the number of crash reports
that are waiting to upload.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=547

Review URL: https://breakpad.appspot.com/714002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1234 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoAllow SIGABRT to abort the program.
thestig@chromium.org [Thu, 7 Nov 2013 22:50:13 +0000 (22:50 +0000)]
Allow SIGABRT to abort the program.

SIGABRT can be generated internally, usually by calling abort(),
or externally by another process.  When the signal is generated
by the kernel, info->si_pid is 0 and the signal is treated in the
same way as an exception (SIGSEGV, etc.), but the assumption
that the exception happens again upon return from the handler
is wrong, so we must have a special case for this.

Original CL: https://breakpad.appspot.com/734002/

BUG=chromium:303075
TEST=tested with Alt-VolumeUp-X on Chrome OS
A=semenzato@chromium.org
R=semenzato@google.com

Review URL: https://breakpad.appspot.com/754002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1233 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoUse register %ebp (instead of %esp) when calculating the value of
ivan.penkov@gmail.com [Tue, 5 Nov 2013 23:50:49 +0000 (23:50 +0000)]
Use register %ebp (instead of %esp) when calculating the value of
.raSearchStart in the cases where there are alignment operators in
the program string.

If alignment operators are found in the program string, the current
value of %ebp must be valid and it is the only reliable data point
that can be used for getting to the previous frame.  Previously, the
.raSearchStart calculation was based on %esp and when %esp is aligned
in the current frame (which is a lossy operation) the resulting
.raSearchStart cannot was incorrect.  There is code that is trying to
work around this problem (scanning of up to 3 words for a return
address) which is unreliable and it doesn't work in many cases (e.g.
when the alignment is on a 64-byte boundary).

This fix is already deployed in Google and it was measured to reduce
the number of wrong stack traces (for Windows crashes) by 45%. No
regressions have been found so far.

Here is an example of an issue that was fixed by this change (where
register %esp is aligned on the 64-byte boundary and the workarounds
that we already had didn't work):

https://code.google.com/p/chromium/issues/detail?id=311359

0:013> uf chrome_59630000!base::MessagePumpForIO::DoRunLoop
  518 59685c39 55      push    ebp
  518 59685c3a 8bec    mov     ebp,esp
  518 59685c3c 83e4c0  and     esp,0FFFFFFC0h  <== 64-byte boundary
  518 59685c3f 83ec34  sub     esp,34h
  518 59685c42 53      push    ebx
  518 59685c43 56      push    esi

Program string contains 64-byte alignment:
$T1 .raSearch = $T0 $T1 4 - 64 @ = $ebp $T1 4 - ^ = $eip $T1 ^ =
$esp $T1 4 + = $20 $T0 56 - ^ =  $23 $T0 60 - ^ =  $24 $T0 64 - ^ =
Review URL: https://breakpad.appspot.com/694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1232 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoAdd support for configuring the minimum log level at compile time
mark@chromium.org [Tue, 5 Nov 2013 19:43:48 +0000 (19:43 +0000)]
Add support for configuring the minimum log level at compile time

The minimum log level can be set by defining to macro BPLOG_MINIMUM_SEVERITY
to one of google_breakpad::LogStream::Severity values. The default is
SEVERITY_INFO.

BUG=none
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/724002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1231 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoNSLocalizedString compatibility (10.8 SDK and clang trunk -Wformat-extra-args)
mark@chromium.org [Tue, 5 Nov 2013 16:53:55 +0000 (16:53 +0000)]
NSLocalizedString compatibility (10.8 SDK and clang trunk -Wformat-extra-args)

Apparently, as of the 10.8 SDK, Apple has quietly decided that the first
argument to NSLocalizedString is supposed to be usable as-is as a format
string, instead of simply being the key to obtain a usable format string.
The recent clang trunk enforces this, resulting in build breaks like

crash_report_sender.m:560:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
             displayName];
             ^

Breaking the result of NSLocalizedString into a temporary NSString* is enough
to suppress the warning.

BUG=chromium:314109
R=thakis@chromium.org

Review URL: https://breakpad.appspot.com/674003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1230 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agomap_serializers_unittest: fix unused variable warning
vapier@chromium.org [Wed, 30 Oct 2013 17:16:38 +0000 (17:16 +0000)]
map_serializers_unittest: fix unused variable warning

Building with clang triggers warnings (which for us breaks the build):
src/processor/map_serializers_unittest.cc:52:11: error:
      unused variable 'kSizeOfInt' [-Werror,-Wunused-const-variable]
1 error generated.

Fix by Yunlian Jiang.

BUG=chromium:311720 (http://crbug.com/311720)
TEST=FEATURES="test" emerge-lumpy google-breakpad passes

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1229 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoPrint response code when sym_upload fails.
mattdr.breakpad@gmail.com [Tue, 29 Oct 2013 23:28:16 +0000 (23:28 +0000)]
Print response code when sym_upload fails.

https://breakpad.appspot.com/631003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1228 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoAdd some symbols missing from my last commit.
mattdr.breakpad@gmail.com [Tue, 29 Oct 2013 20:16:46 +0000 (20:16 +0000)]
Add some symbols missing from my last commit.

https://breakpad.appspot.com/622002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1227 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoAdd simple exploitability analysis for Linux crashes.
mattdr.breakpad@gmail.com [Tue, 29 Oct 2013 20:03:39 +0000 (20:03 +0000)]
Add simple exploitability analysis for Linux crashes.

https://breakpad.appspot.com/622002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1226 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoSwitch to scoped_array instead of inappropriate scoped_ptr.
jessicag.feedback [Mon, 28 Oct 2013 23:39:43 +0000 (23:39 +0000)]
Switch to scoped_array instead of inappropriate scoped_ptr.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1225 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoincrease exception handler stack size for dumping thread
vapier@chromium.org [Wed, 23 Oct 2013 05:12:37 +0000 (05:12 +0000)]
increase exception handler stack size for dumping thread

When running unittests under ASAN, we see that these code paths can
slightly smash the stack.  Double it to avoid that.

[ RUN      ] ExceptionHandlerTest.InstructionPointerMemoryMinBound
=================================================================
==12775== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xf6787614 at pc 0xf7516b29 bp 0xf6786d38 sp 0xf6786d30
READ of size 4 at 0xf6787614 thread T0
    #0 0xf7516b28 (/build/x86-generic/tmp/portage/chromeos-base/google-breakpad-1181-r66/work/google-breakpad-1181/build/src/client/linux/linux_client_unittest_shlib+0x69eb28)
Shadow byte and word:
  0x3ecf0ec2: f2
  0x3ecf0ec0: f2 f2 f2 f2
More shadow bytes:
  0x3ecf0eb0: f2 f2 f2 f2
  0x3ecf0eb4: 04 f4 f4 f4
  0x3ecf0eb8: f2 f2 f2 f2
  0x3ecf0ebc: 04 f4 f4 f4
=>0x3ecf0ec0: f2 f2 f2 f2
  0x3ecf0ec4: 04 f4 f4 f4
  0x3ecf0ec8: f2 f2 f2 f2
  0x3ecf0ecc: 04 f4 f4 f4
  0x3ecf0ed0: f2 f2 f2 f2
Stats: 0M malloced (0M for red zones) by 2757 calls
Stats: 0M realloced by 0 calls
Stats: 0M freed by 2229 calls
Stats: 0M really freed by 0 calls
Stats: 3M (899 full pages) mmaped in 7 calls
  mmaps   by size class: 7:4095; 8:2047; 9:1023; 10:511; 14:32; 16:16;
  mallocs by size class: 7:1831; 8:590; 9:85; 10:233; 14:3; 16:15;
  frees   by size class: 7:1459; 8:437; 9:84; 10:232; 14:2; 16:15;
  rfrees  by size class:
Stats: malloc large: 15 small slow: 25
==12775== ABORTING

BUG=chromium:293519
TEST=ran unittests under ASAN and they now pass
R=benchan@chromium.org

Review URL: https://breakpad.appspot.com/636002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1224 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoRemove define of mach_vm_region from mach_vm_compatibility.h.
qsr@chromium.org [Thu, 17 Oct 2013 11:03:26 +0000 (11:03 +0000)]
Remove define of mach_vm_region from mach_vm_compatibility.h.

mach_vm_region() is not called in the Breakpad codebase.

Patch by: blundell@chromium.org

R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/643002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1223 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoSupport symbol dumping for ARMV8 iOS apps.
qsr@chromium.org [Tue, 15 Oct 2013 10:24:21 +0000 (10:24 +0000)]
Support symbol dumping for ARMV8 iOS apps.

In my testing, ARM V8 object files and ARM V8 slices of universal binaries do
not contain debug_frame sections (at least at this time), and hence dump_syms
does not output CFI for ARM V8 even in the absence of the "-c" flag.

Patch by:blundell@chromium.org

BUG=542
R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/642002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1222 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoRemove unittest from sources list of iOS client xcodeproj.
qsr@chromium.org [Tue, 15 Oct 2013 08:34:02 +0000 (08:34 +0000)]
Remove unittest from sources list of iOS client xcodeproj.

This unittest has a main(), which causes linker errors when the library is
linked into an application.

Patch by:blundell@chromium.org

R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/640002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1221 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoFix missing include in ios_exception_minidump_generator.mm.
qsr@chromium.org [Fri, 11 Oct 2013 09:17:13 +0000 (09:17 +0000)]
Fix missing include in ios_exception_minidump_generator.mm.

R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/637004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1220 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoIn NonAllocatingMap, remove asserts around key/value length.
rsesek@chromium.org [Tue, 1 Oct 2013 21:32:16 +0000 (21:32 +0000)]
In NonAllocatingMap, remove asserts around key/value length.

Since the data is stored using strncpy they are merely advisory in debug mode.

BUG=https://code.google.com/p/chromium/issues/detail?id=298225
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/635002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1219 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoThis patch adds required change for stackwalker_mips_unittest to pass on 64bit
gordana.cmiljanovic@imgtec.com [Mon, 30 Sep 2013 09:34:55 +0000 (09:34 +0000)]
This patch adds required change for stackwalker_mips_unittest to pass on 64bit
platforms.

One test from stackwalker_mips_unittest was failing as mentioned in:
https://breakpad.appspot.com/632002/
https://breakpad.appspot.com/633002/

BUG=none
TEST=stackwalker_mips_unittest (run on x86-64 and mips)

Review URL: https://breakpad.appspot.com/634002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1218 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoAdding stricter validation checks to various symbol parser functions.
ivan.penkov@gmail.com [Wed, 25 Sep 2013 18:25:13 +0000 (18:25 +0000)]
Adding stricter validation checks to various symbol parser functions.

More specifically, the validation of the following record types is improved:
 - FILE records
 - FUNC records
 - Line record
 - PUBLIC records

Adding unittests.
Review URL: https://breakpad.appspot.com/632003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1217 4c0a9323-5329-0410-9bdc-e9ce6186880e