Gwinel / gperftools

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

error after link with libtcmalloc.4.dylib #563

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.download source code and do ./cofiguration && make to create the 
libtcmalloc.4.dylib
2.then use otool and install_name_tool change the load path
3.add the libtcmalloc.4.dylib to Xcode project
4.then build test app and run 
5.recursion infinite in tc_malloc call loop then make stack overflow 

What is the expected output? What do you see instead?
nothing, crash in libdyld.dylib tlv_get_addr 
and the call stack is 
491 libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
492 libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
493 libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
494 libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
495 libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
496 libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
497 libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
498 libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
499 libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
500 libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
501 libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
502 libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
503 libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
504 libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
505 libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
506 libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
507 libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
508 libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
509 libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
510 libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
511 libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45

What version of the product are you using? On what operating system?
Normal Framework. OS X 10.9

Please provide any additional information below.
tcmalloc source code version 2.1

Application Specific Information:
/Users/retval8237/Library/Frameworks//libtcmalloc.4.dylib

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libtcmalloc.4.dylib             0x0000000102aa430c (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 44
1   libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
2   libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
3   libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
4   libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
5   libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
6   libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
7   libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
8   libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
9   libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
10  libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
11  libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
12  libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
13  libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
14  libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
15  libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
16  libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
17  libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
18  libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
19  libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
20  libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
21  libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
22  libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
23  libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
24  libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
25  libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
26  libsystem_malloc.dylib          0x00007fff922f2a2c malloc_zone_malloc + 71
27  libsystem_malloc.dylib          0x00007fff922f339b malloc + 42
28  libdyld.dylib                   0x00007fff96e16ca8 
tlv_allocate_and_initialize_for_key + 322
29  libdyld.dylib                   0x00007fff96e174a3 tlv_get_addr + 378
30  libtcmalloc.4.dylib             0x0000000102aa430e (anonymous 
namespace)::do_malloc_no_errno(unsigned long) + 46
31  libtcmalloc.4.dylib             0x0000000102aba60d tc_malloc + 45
......

Original issue reported on code.google.com by RetVal8...@gmail.com on 14 Aug 2013 at 11:23

GoogleCodeExporter commented 9 years ago
Can you try instructions on issue 413 ?

Original comment by alkondratenko on 18 Aug 2013 at 1:06