ssett / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SIGTRAP on OSX when using CoreFoundation #657

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the test program below
2. Run in it with profiler activated

What is the expected output? What do you see instead?

It should launch the browser with the specified URL.
Instead I get a SIGTRAP

What version of the product are you using? On what operating system?

Tried it on 2.2.1 and 2.2.90 (2.3rc)

Please provide any additional information below.

The backtrace :

Program received signal SIGTRAP, Trace/breakpoint trap.
0x922b2e07 in __CFTypeCollectionRetain ()
(gdb) bt
#0  0x922b2e07 in __CFTypeCollectionRetain ()
#1  0x922b2725 in __CFBasicHashAddValue ()
#2  0x922b2519 in CFBasicHashSetValue ()
#3  0x922b18dd in CFDictionarySetValue ()
#4  0x93070ece in _LSLaunch ()
#5  0x9300e425 in _LSOpenItemsWithHandler_CFDictionaryApplier ()
#6  0x922ee820 in __CFDictionaryApplyFunction_block_invoke ()
#7  0x922ee7da in CFBasicHashApply ()
#8  0x922ee733 in CFDictionaryApplyFunction ()
#9  0x9300c7a0 in _LSOpenStuff ()
#10 0x93061850 in _LSOpenURLsWithRole_Common ()
#11 0x9300c067 in LSOpenFromURLSpec ()
#12 0x93061976 in LSOpenCFURLRef ()
#13 0x00001f05 in openURL (url_str=0x1f98 "http://www.example.com") at 
../mytest.c:16
#14 0x00001f40 in main () at ../mytest.c:22

My system :
sw_vers
ProductName:    Mac OS X
ProductVersion: 10.9.5
BuildVersion:   13F34

clang --version
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Original issue reported on code.google.com by jon...@pinacea.com on 12 Nov 2014 at 11:56

Attachments:

GoogleCodeExporter commented 9 years ago
Forgot to add I tried this for a 32-bit program:

Compilation :
clang -g -arch i386 -c mytest.c

Link :
clang -g -arch i386 -o mytest mytest.o -L/tmp/gperftools2.2.1/lib -framework 
CoreFoundation -framework ApplicationServices -lprofiler

Original comment by jon...@pinacea.com on 12 Nov 2014 at 11:57

GoogleCodeExporter commented 9 years ago
Backtrace using lldb:

(lldb) bt
* thread #1: tid = 0x13e9bf, 0x922b2e07 CoreFoundation`__CFTypeCollectionRetain 
+ 247, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT 
(code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x922b2e07 CoreFoundation`__CFTypeCollectionRetain + 247
    frame #1: 0x922b2725 CoreFoundation`__CFBasicHashAddValue + 405
    frame #2: 0x922b2519 CoreFoundation`CFBasicHashSetValue + 3049
    frame #3: 0x922b18dd CoreFoundation`CFDictionarySetValue + 205
    frame #4: 0x93070ece LaunchServices`_LSLaunch(LSContext*, FSNode*, unsigned long, void*, __CFArray const*, AEDesc const*, __CFArray const*, __CFDictionary const*, unsigned long, ProcessSerialNumber*) + 10007
    frame #5: 0x9300e425 LaunchServices`_LSOpenItemsWithHandler_CFDictionaryApplier(void const*, void const*, void*) + 3839
    frame #6: 0x922ee820 CoreFoundation`__CFDictionaryApplyFunction_block_invoke + 32
    frame #7: 0x922ee7da CoreFoundation`CFBasicHashApply + 122
    frame #8: 0x922ee733 CoreFoundation`CFDictionaryApplyFunction + 147
    frame #9: 0x9300c7a0 LaunchServices`_LSOpenStuff + 1481
    frame #10: 0x93061850 LaunchServices`_LSOpenURLsWithRole_Common(__CFArray const*, unsigned long, AEKeyDesc const*, LSApplicationParameters_V1 const*, ProcessSerialNumber*, long, FSRef*) + 645
    frame #11: 0x9300c067 LaunchServices`LSOpenFromURLSpec + 235
    frame #12: 0x93061976 LaunchServices`LSOpenCFURLRef + 121
    frame #13: 0x00001f05 mytest`openURL(url_str=0x00001f98) + 117 at mytest.c:16
    frame #14: 0x00001f40 mytest`main + 32 at mytest.c:22
    frame #15: 0x958b3701 libdyld.dylib`start + 1

Original comment by jon...@pinacea.com on 12 Nov 2014 at 12:06