1

我正在 OS X 上用 C++ 编写一个项目。由于各种原因(兼容性、OpenMP 等),它必须使用 g++ 编译。我使用自制软件安装了 g++-4.9。

我真的很想使用 google 日志库,但我一直在使用它进行静默崩溃。然而,谷歌 gflags 库工作得很好。我也用自制软件安装了这两个。

我怀疑有一段时间是因为自制程序是用 clang++ 编译的,所以我在配置命令中添加了 CXX=g++-4.9 和 CXXFLAGS=-std=c++11 ,但这并没有改变任何东西。

我附上了一份无声的崩溃报告。

singleexperiment:179 包含该行LOG(INFO) << "Hello";

Process:               singleexperiment [16309]
Path:                  /Users/USER/Documents/*/singleexperiment
Identifier:            singleexperiment
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        eclipse [696]
Responsible:           eclipse [696]
User ID:               503    

Date/Time:             2015-05-19 11:03:14.700 +0200
OS Version:            Mac OS X 10.10.3 (14D136)
Report Version:        11
Anonymous UUID:        5C66A03E-F5BA-1E38-7FF5-525A5BEFB7CE    


Time Awake Since Boot: 4000 seconds    

Crashed Thread:        0  Dispatch queue: com.apple.main-thread    

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000008a00000002    

VM Regions Near 0x8a00000002:
    MALLOC (admin)         0000000107091000-0000000107092000 [    4K] ---/rwx SM=NUL  
--> 
    MALLOC_TINY            00007f7f8b400000-00007f7f8b800000 [ 4096K] rw-/rwx SM=PRV      

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libstdc++.6.dylib               0x0000000106eb2cb1 std::ostream::flush() + 1
1   libstdc++.6.dylib               0x0000000106eb3205 std::ostream::sentry::sentry(std::ostream&) + 53
2   libstdc++.6.dylib               0x0000000106eb3979 std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) + 41
3   libstdc++.6.dylib               0x0000000106eb3e17 std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) + 39
4   singleexperiment                0x0000000106bff4f0 main + 144 (singleexperiment.cpp:179)
5   libdyld.dylib                   0x00007fff905015c9 start + 1    

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007f7f8c00a990  rbx: 0x00007f7f8c00a938  rcx: 0x000000000000000f  rdx: 0x0000000106e15d28
  rdi: 0x0000008a00000002  rsi: 0x0000000000000000  rbp: 0x00007fff5902b030  rsp: 0x00007fff5902afe0
   r8: 0x00000000000000b3   r9: 0x0000000000000030  r10: 0x0000000000018fc0  r11: 0x0000000106eb3df0
  r12: 0x0000000000000000  r13: 0x0000000000000005  r14: 0x00007fff5902b030  r15: 0x00007fff5902b750
  rip: 0x0000000106eb2cb1  rfl: 0x0000000000010246  cr2: 0x0000008a00000002

Logical CPU:     7
Error Code:      0x00000004
Trap Number:     14    


Binary Images:
       0x106bd4000 -        0x106c0cff7 +singleexperiment (0) <B871D7DB-6246-31B6-9208-A4182C5CAFB0> /Users/USER/Documents/*/singleexperiment
       0x106c33000 -        0x106d7cff7 +libgsl.0.dylib (0) <88351A65-8BF2-39CB-AF2E-DD5CDFC2DC5E> /usr/local/opt/gsl/lib/libgsl.0.dylib
       0x106dde000 -        0x106df2fff +libgflags.2.dylib (0) <11C6BC03-398C-3A04-B5C3-8E249D52AE85> /usr/local/lib/libgflags.2.dylib
       0x106e04000 -        0x106e14ff7 +libglog.0.dylib (0) <AE09FA7F-0C06-3B14-A695-E643FE56DE35> /usr/local/lib/libglog.0.dylib
       0x106e32000 -        0x106e61ff7 +libgslcblas.0.dylib (0) <0349640E-4846-361E-9D01-833F2FE797A7> /usr/local/opt/gsl/lib/libgslcblas.0.dylib
       0x106e68000 -        0x106f1ffef +libstdc++.6.dylib (0) <8C0D60D7-0028-3C81-97E2-5D13663787FB> /usr/local/lib/gcc/4.9/libstdc++.6.dylib
       0x107024000 -        0x107036fef +libgomp.1.dylib (0) <6863F761-B767-30CA-B2F0-20C0F40EFE8C> /usr/local/lib/gcc/4.9/libgomp.1.dylib
       0x107044000 -        0x107059ff7 +libgcc_s.1.dylib (0) <8773A1EE-2453-397C-BFC8-57EC484A85DF> /usr/local/lib/gcc/4.9/libgcc_s.1.dylib
    0x7fff666b7000 -     0x7fff666ed837  dyld (353.2.1) <65DCCB06-339C-3E25-9702-600A28291D0E> /usr/lib/dyld
    0x7fff87a90000 -     0x7fff87a92fff  libsystem_sandbox.dylib (358.20.5) <4CF77128-6BE0-3958-B646-707FA9CE61B2> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff88a56000 -     0x7fff88a5cff7  libsystem_networkextension.dylib (167.1.10) <29AB225B-D7FB-30ED-9600-65D44B9A9442> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff88ab4000 -     0x7fff88ab9ff7  libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
    0x7fff89214000 -     0x7fff89268fff  libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
    0x7fff89728000 -     0x7fff89730fff  libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
    0x7fff89eb1000 -     0x7fff89eb2ffb  libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
    0x7fff89f18000 -     0x7fff89f43fff  libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
    0x7fff8a17a000 -     0x7fff8a190ff7  libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
    0x7fff8a263000 -     0x7fff8a268fff  libsystem_stats.dylib (163.20.16) <FBC3F80F-A0FB-3BD6-9A7E-800DE45F092E> /usr/lib/system/libsystem_stats.dylib
    0x7fff8a939000 -     0x7fff8a956fff  libsystem_kernel.dylib (2782.20.48) <EAFD7BD0-0C30-3E7D-9528-F9916BA0167C> /usr/lib/system/libsystem_kernel.dylib
    0x7fff8b251000 -     0x7fff8b252ff3  libSystem.B.dylib (1213) <CCEC13A5-D0D9-31C5-B0B0-1C564B4A20A6> /usr/lib/libSystem.B.dylib
    0x7fff8bf3b000 -     0x7fff8bf44ff7  libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
    0x7fff8cba5000 -     0x7fff8cbacff7  libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
    0x7fff8ce35000 -     0x7fff8ce3bfff  libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib
    0x7fff8d154000 -     0x7fff8d15cffb  libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
    0x7fff8d68c000 -     0x7fff8d691ff7  libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
    0x7fff8d88c000 -     0x7fff8d8a8ff7  libsystem_malloc.dylib (53.1.1) <19BCC257-5717-3502-A71F-95D65AFA861B> /usr/lib/system/libsystem_malloc.dylib
    0x7fff8e9c0000 -     0x7fff8e9c4fff  libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
    0x7fff8edeb000 -     0x7fff8ee15ff7  libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
    0x7fff8fafd000 -     0x7fff8fb25fff  libsystem_info.dylib (459.20.1) <AEB3FE62-4763-3050-8352-D6F9AF961AE6> /usr/lib/system/libsystem_info.dylib
    0x7fff904fe000 -     0x7fff90501ff7  libdyld.dylib (353.2.1) <9EACCA38-291D-38CC-811F-7E9D1451E2D3> /usr/lib/system/libdyld.dylib
    0x7fff9088d000 -     0x7fff9089efff  libsystem_coretls.dylib (35.20.2) <6084A531-2523-39F8-B030-811FA1A32FB5> /usr/lib/system/libsystem_coretls.dylib
    0x7fff908a8000 -     0x7fff90934ff7  libsystem_c.dylib (1044.10.1) <86FBED7A-F2C8-3591-AD6F-486DD57E6B6A> /usr/lib/system/libsystem_c.dylib
    0x7fff917fc000 -     0x7fff91804fff  libsystem_dnssd.dylib (561.1.1) <62B70ECA-E40D-3C63-896E-7F00EC386DDB> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff91e38000 -     0x7fff91e3afff  libquarantine.dylib (76.20.1) <7AF90041-2768-378A-925A-D83161863642> /usr/lib/system/libquarantine.dylib
    0x7fff91e3b000 -     0x7fff91e3cff7  libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
    0x7fff91e3d000 -     0x7fff91e65fff  libxpc.dylib (559.20.9) <D35D0DB2-D7BD-3BE4-8378-062BFE545E1D> /usr/lib/system/libxpc.dylib
    0x7fff91f88000 -     0x7fff91fceff7  libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
    0x7fff9282b000 -     0x7fff9282dfff  libsystem_configuration.dylib (699.1.5) <20F3B077-179D-3CB0-A3C1-C8602D53B4DB> /usr/lib/system/libsystem_configuration.dylib
    0x7fff92b54000 -     0x7fff92b54ff7  liblaunch.dylib (559.20.9) <FA89A113-696E-3271-8FE1-A0D7324E8481> /usr/lib/system/liblaunch.dylib
    0x7fff92ec2000 -     0x7fff92ec3fff  libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff930a1000 -     0x7fff930a2fff  libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
    0x7fff93a41000 -     0x7fff93a41ff7  libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
    0x7fff93be4000 -     0x7fff93bedfff  libsystem_pthread.dylib (105.10.1) <3103AA7F-3BAE-3673-9649-47FFD7E15C97> /usr/lib/system/libsystem_pthread.dylib
    0x7fff93c91000 -     0x7fff93d07fe7  libcorecrypto.dylib (233.1.2) <E1789801-3985-3949-B736-6B3378873301> /usr/lib/system/libcorecrypto.dylib
    0x7fff946ba000 -     0x7fff946f2fff  libsystem_network.dylib (412.20.3) <589A5F67-BE2A-3245-A181-0ECC9B53EB00> /usr/lib/system/libsystem_network.dylib
    0x7fff946f3000 -     0x7fff946f5ff7  libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff94a26000 -     0x7fff94a56fff  libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
    0x7fff9514c000 -     0x7fff9514cff7  libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
    0x7fff96e4a000 -     0x7fff96e55fff  libcommonCrypto.dylib (60061) <D381EBC6-69D8-31D3-8084-5A80A32CB748> /usr/lib/system/libcommonCrypto.dylib
    0x7fff96e6d000 -     0x7fff9706746f  libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib    

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 1573
    thread_create: 0
    thread_set_state: 0    

VM Region Summary:
ReadOnly portion of Libraries: Total=80.8M resident=161.2M(199%) swapped_out_or_unallocated=16777216.0T(21759673761792%)
Writable regions: Total=36.6M written=236K(1%) resident=1612K(4%) swapped_out=0K(0%) unallocated=35.0M(96%)

REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                             28.2M
MALLOC (admin)                       16K
STACK GUARD                        56.0M
Stack                              8192K
VM_ALLOCATE                          12K
__DATA                              992K
__LINKEDIT                         72.3M
__TEXT                             8736K
shared memory                         4K
===========                      =======
TOTAL                             174.0M    
4

0 回答 0