Skip to content

Commit

Permalink
Make dump_syms 64-bit on Mac.
Browse files Browse the repository at this point in the history
The framework's grown to the point that 32-bit dump_syms no longer has enough
memory to do its job. It is failing with messages like:

dump_syms(12345) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
dump_syms(12345) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
dump_syms(12345) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'St9bad_alloc'
  what():  std::bad_alloc

Moving to 64-bit gives it more space to work with. 64-bit dump_syms is able to
dump 32-bit files.

BUG=102361
TEST=Breakpad-enabled official release builds
Review URL: http://codereview.chromium.org/8409009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107947 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mark@chromium.org committed Oct 31, 2011
1 parent 0171d2b commit 3ad7369
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions breakpad/breakpad.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@
{
'target_name': 'dump_syms',
'type': 'executable',
'variables': {
# Turn off PIE because it may interfere with dump_syms' ability to
# allocate a contiguous region in memory large enough to mmap the
# entire unstripped framework in a 32-bit dump_syms process.
'mac_pie': 0,
},
'include_dirs++': [
# ++ ensures this comes before src brought in from target_defaults.
'pending/src',
Expand Down Expand Up @@ -144,8 +138,17 @@
'HAVE_MACH_O_NLIST_H',
],
'xcode_settings': {
# Like ld, dump_syms needs to operate on enough data that it may
# actually need to be able to address more than 4GB. Use x86_64.
# Don't worry! An x86_64 dump_syms is perfectly able to dump
# 32-bit files.
'ARCHS': [
'x86_64',
],

# The DWARF utilities require -funsigned-char.
'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',

# dwarf2reader.cc uses dynamic_cast.
'GCC_ENABLE_CPP_RTTI': 'YES',
},
Expand Down

0 comments on commit 3ad7369

Please sign in to comment.