You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(15) |
2
(13) |
3
(16) |
4
(12) |
5
(17) |
|
6
(16) |
7
(13) |
8
(15) |
9
(15) |
10
(18) |
11
(5) |
12
(17) |
|
13
(13) |
14
(13) |
15
(5) |
16
(13) |
17
(2) |
18
(19) |
19
(12) |
|
20
|
21
(22) |
22
(23) |
23
(23) |
24
(23) |
25
(20) |
26
(19) |
|
27
(33) |
28
(20) |
29
(15) |
30
(21) |
31
(20) |
|
|
|
From: Dave G. <go...@mc...> - 2012-05-11 22:42:18
|
On May 11, 2012, at 5:25 PM CDT, Philippe Waroquiers wrote: > On Fri, 2012-05-11 at 09:56 +0200, Julian Seward wrote: >> On Friday, May 11, 2012, Philippe Waroquiers wrote: >>> I can take in charge looking the patch of Dave, and adding >>> the relevant sentences in the documentation and/or headers. >> >> Yes, please do. > Revision 12560 fixes Bug 299756 - for symmetry, --free-fill must be > ignored for MEMPOOL_FREE and FREELIKE client requests Thanks! >> (kind-of unrelated) >> There's also a configure script change from Dave w.r.t. MPI, >> that we should take, #274078 I think. > > I took a quick look at this but I am not too sure I understand the > problem (and I have no mpi installation to experiment with). > IIUC, it seems linked with static mpi library. The issue is that the configure logic that checks for a functional "mpicc" script doesn't match up with the actual build logic used at "make" time. So it's possible to end up with Valgrind "successfully" detecting an mpicc that can't actually build the MPI wrappers. One very common scenario is where MPICH2 is built with static libs only (the default) but the MPI wrappers are built relocatable: http://thread.gmane.org/gmane.comp.debugging.valgrind/11102/focus=11105 Another scenario is on Darwin when the MPI library has only been built for one architecture but Valgrind is building bi-arch, so one of the architectures fails: http://thread.gmane.org/gmane.comp.debugging.valgrind/12039/focus=12041 > Note that with the introduction of --soname-synonyms in rev 12559, > it should be possible to support a statically linked mpi library > with small modifications in the mpi wrappers. This would probably help reduce the number of failures due to the first scenario, but the improved configure logic should still be implemented. The MPI implementation may not be compatible with building the Valgrind MPI wrappers for a variety of reasons, and Valgrind users shouldn't get bizarre make-time failures when building Valgrind. -Dave |
|
From: Philippe W. <phi...@sk...> - 2012-05-11 22:25:31
|
On Fri, 2012-05-11 at 09:56 +0200, Julian Seward wrote: > On Friday, May 11, 2012, Philippe Waroquiers wrote: > > I can take in charge looking the patch of Dave, and adding > > the relevant sentences in the documentation and/or headers. > > Yes, please do. Revision 12560 fixes Bug 299756 - for symmetry, --free-fill must be ignored for MEMPOOL_FREE and FREELIKE client requests > > (kind-of unrelated) > There's also a configure script change from Dave w.r.t. MPI, > that we should take, #274078 I think. I took a quick look at this but I am not too sure I understand the problem (and I have no mpi installation to experiment with). IIUC, it seems linked with static mpi library. Note that with the introduction of --soname-synonyms in rev 12559, it should be possible to support a statically linked mpi library with small modifications in the mpi wrappers. Philippe |
|
From: <sv...@va...> - 2012-05-11 22:10:47
|
philippe 2012-05-11 23:10:39 +0100 (Fri, 11 May 2012)
New Revision: 12560
Log:
fix 299756 (for symmetry, --free-fill must be ignored for MEMPOOL_FREE and FREELIKE client requests).
Test program from go...@mc...
Added files:
trunk/memcheck/tests/clireq_nofill.c
trunk/memcheck/tests/clireq_nofill.stderr.exp
trunk/memcheck/tests/clireq_nofill.stdout.exp
trunk/memcheck/tests/clireq_nofill.vgtest
Modified files:
trunk/NEWS
trunk/memcheck/docs/mc-manual.xml
trunk/memcheck/mc_malloc_wrappers.c
trunk/memcheck/tests/Makefile.am
Modified: trunk/memcheck/tests/Makefile.am (+3 -0)
===================================================================
--- trunk/memcheck/tests/Makefile.am 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/tests/Makefile.am 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -70,6 +70,8 @@
calloc-overflow.stderr.exp calloc-overflow.vgtest\
clientperm.stderr.exp \
clientperm.stdout.exp clientperm.vgtest \
+ clireq_nofill.stderr.exp \
+ clireq_nofill.stdout.exp clireq_nofill.vgtest \
custom_alloc.stderr.exp custom_alloc.vgtest custom_alloc.stderr.exp-s390x-mvc \
custom-overlap.stderr.exp custom-overlap.vgtest \
deep_templates.vgtest \
@@ -233,6 +235,7 @@
bug287260 \
calloc-overflow \
clientperm \
+ clireq_nofill \
custom_alloc \
custom-overlap \
deep_templates \
Modified: trunk/NEWS (+2 -1)
===================================================================
--- trunk/NEWS 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/NEWS 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -99,7 +99,8 @@
297992 Support systems missing WIFCONTINUED (e.g. pre-2.6.10 Linux)
297993 Fix compilation of valgrind with gcc -g3.
298394 s390x: Don't bail out on an unknown machine model. Assume it's a new model.
-298943 massif asserts with --pages-as-heap=yes when brk is chaning by value different of page size
+298943 massif asserts with --pages-as-heap=yes when brk is changing by value different of page size
+299756 for symmetry, --free-fill must be ignored for MEMPOOL_FREE and FREELIKE client requests
Release 3.7.0 (5 November 2011)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added: trunk/memcheck/tests/clireq_nofill.stderr.exp (+12 -0)
===================================================================
--- trunk/memcheck/tests/clireq_nofill.stderr.exp 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/tests/clireq_nofill.stderr.exp 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -0,0 +1,12 @@
+Invalid read of size 1
+ at 0x........: main (clireq_nofill.c:23)
+ Address 0x........ is 0 bytes inside a recently re-allocated block of size 40 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (clireq_nofill.c:16)
+
+Invalid read of size 1
+ at 0x........: main (clireq_nofill.c:36)
+ Address 0x........ is 0 bytes inside a recently re-allocated block of size 40 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (clireq_nofill.c:29)
+
Modified: trunk/memcheck/mc_malloc_wrappers.c (+3 -1)
===================================================================
--- trunk/memcheck/mc_malloc_wrappers.c 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/mc_malloc_wrappers.c 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -344,7 +344,9 @@
static
void die_and_free_mem ( ThreadId tid, MC_Chunk* mc, SizeT rzB )
{
- if (MC_(clo_free_fill) != -1) {
+ /* Note: we do not free fill the custom allocs produced
+ by MEMPOOL or by MALLOC/FREELIKE_BLOCK requests. */
+ if (MC_(clo_free_fill) != -1 && MC_AllocCustom != mc->allockind ) {
tl_assert(MC_(clo_free_fill) >= 0x00 && MC_(clo_free_fill) <= 0xFF);
VG_(memset)((void*)mc->data, MC_(clo_free_fill), mc->szB);
}
Added: trunk/memcheck/tests/clireq_nofill.stdout.exp (+6 -0)
===================================================================
--- trunk/memcheck/tests/clireq_nofill.stdout.exp 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/tests/clireq_nofill.stdout.exp 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -0,0 +1,6 @@
+*s=0x5 after MEMPOOL_ALLOC
+*s=0x5 after MEMPOOL_FREE
+*s=0x5 after second MEMPOOL_ALLOC
+*s=0x5 after MALLOCLIKE_BLOCK
+*s=0x5 after FREELIKE_BLOCK
+*s=0x5 after second MALLOCLIKE_BLOCK
Modified: trunk/memcheck/docs/mc-manual.xml (+7 -2)
===================================================================
--- trunk/memcheck/docs/mc-manual.xml 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/docs/mc-manual.xml 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -855,7 +855,10 @@
byte. This can be useful when trying to shake out obscure
memory corruption problems. The allocated area is still
regarded by Memcheck as undefined -- this option only affects its
- contents.
+ contents. Note that <option>--malloc-fill</option> does not
+ affect a block of memory when it is used as argument
+ to client requests VALGRIND_MEMPOOL_ALLOC or
+ VALGRIND_MALLOCLIKE_BLOCK.
</para>
</listitem>
</varlistentry>
@@ -871,7 +874,9 @@
specified byte value. This can be useful when trying to shake out
obscure memory corruption problems. The freed area is still
regarded by Memcheck as not valid for access -- this option only
- affects its contents.
+ affects its contents. Note that <option>--free-fill</option> does not
+ affect a block of memory when it is used as argument to
+ client requests VALGRIND_MEMPOOL_FREE or VALGRIND_FREELIKE_BLOCK.
</para>
</listitem>
</varlistentry>
Added: trunk/memcheck/tests/clireq_nofill.vgtest (+2 -0)
===================================================================
--- trunk/memcheck/tests/clireq_nofill.vgtest 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/tests/clireq_nofill.vgtest 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -0,0 +1,2 @@
+prog: clireq_nofill
+vgopts: -q --undef-value-errors=no --malloc-fill=0xaf --free-fill=0xdb
Added: trunk/memcheck/tests/clireq_nofill.c (+42 -0)
===================================================================
--- trunk/memcheck/tests/clireq_nofill.c 2012-05-11 20:33:46 +01:00 (rev 12559)
+++ trunk/memcheck/tests/clireq_nofill.c 2012-05-11 23:10:39 +01:00 (rev 12560)
@@ -0,0 +1,42 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "valgrind.h"
+#include "../memcheck.h"
+
+struct super { int x; };
+static struct super superblock = { 12345 };
+
+/* run with `valgrind -q --malloc-fill=0xaf --free-fill=0xdb` */
+int main(int argc, char **argv)
+{
+ unsigned char *s;
+ VALGRIND_CREATE_MEMPOOL(&superblock, /*rzB=*/0, /*is_zeroed=*/0);
+ s = malloc(40);
+ assert(s);
+ assert(*s == 0xaf);
+ *s = 0x05;
+ VALGRIND_MEMPOOL_ALLOC(&superblock, s, 40);
+ printf("*s=%#hhx after MEMPOOL_ALLOC\n", *s);
+ VALGRIND_MEMPOOL_FREE(&superblock, s);
+ printf("*s=%#hhx after MEMPOOL_FREE\n", *s);
+ VALGRIND_MEMPOOL_ALLOC(&superblock, s, 40);
+ printf("*s=%#hhx after second MEMPOOL_ALLOC\n", *s);
+ free(s);
+ VALGRIND_DESTROY_MEMPOOL(&superblock);
+
+ s = malloc(40);
+ assert(s);
+ assert(*s == 0xaf);
+ *s = 0x05;
+ VALGRIND_MALLOCLIKE_BLOCK(s, 40, 0/*rzB*/, 0/*is_zeroed*/);
+ printf("*s=%#hhx after MALLOCLIKE_BLOCK\n", *s);
+ VALGRIND_FREELIKE_BLOCK(s, 0/*rzB*/);
+ printf("*s=%#hhx after FREELIKE_BLOCK\n", *s);
+ VALGRIND_MALLOCLIKE_BLOCK(s, 40, 0/*rzB*/, 0/*is_zeroed*/);
+ printf("*s=%#hhx after second MALLOCLIKE_BLOCK\n", *s);
+
+ return 0;
+}
+
|
|
From: <sv...@va...> - 2012-05-11 19:33:55
|
philippe 2012-05-11 20:33:46 +0100 (Fri, 11 May 2012)
New Revision: 12559
Log:
fix 219156 support static malloc or alternate malloc lib (e.g. tcmalloc) with new option --soname-synonyms
* pub_tool_redir.h : define the prefix to be used for "soname synonym"
place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
in clo_soname_synonyms if there is a synonym pattern.
If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest
Added files:
trunk/memcheck/tests/static_malloc.c
trunk/memcheck/tests/static_malloc.stderr.exp
trunk/memcheck/tests/static_malloc.vgtest
Modified files:
trunk/NEWS
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/coregrind/m_redir.c
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/coregrind/pub_core_options.h
trunk/docs/xml/manual-core.xml
trunk/include/pub_tool_redir.h
trunk/memcheck/tests/Makefile.am
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/include/pub_tool_redir.h (+5 -0)
===================================================================
--- trunk/include/pub_tool_redir.h 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/include/pub_tool_redir.h 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -300,6 +300,11 @@
#endif
+// Prefix for synonym soname synonym handling
+#define VG_SO_SYN(name) VgSoSyn##name
+#define VG_SO_SYN_PREFIX "VgSoSyn"
+#define VG_SO_SYN_PREFIX_LEN 7
+
#endif // __PUB_TOOL_REDIR_H
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/pub_core_options.h (+4 -0)
===================================================================
--- trunk/coregrind/pub_core_options.h 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/coregrind/pub_core_options.h 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -86,6 +86,10 @@
/* Automatically attempt to demangle C++ names? default: YES */
extern Bool VG_(clo_demangle);
/* Simulate child processes? default: NO */
+/* Soname synonyms : a string containing a list of pairs
+ xxxxx=yyyyy separated by commas.
+ E.g. --soname-synonyms=somalloc=libtcmalloc*.so*,solibtruc=NONE */
+extern HChar* VG_(clo_soname_synonyms);
extern Bool VG_(clo_trace_children);
/* String containing comma-separated patterns for executable names
that should not be traced into even when --trace-children=yes */
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c (+48 -1)
===================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -256,15 +256,22 @@
// Each of these lines generates a replacement function:
// (from_so, from_fn, v's replacement)
+// For some lines, we will also define a replacement function
+// whose only purpose is to be a soname synonym place holder
+// that can be replaced using --soname-synonyms.
+#define SO_SYN_MALLOC VG_SO_SYN(somalloc)
// malloc
#if defined(VGO_linux)
ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, malloc, malloc);
ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc, malloc);
+ ALLOC_or_NULL(SO_SYN_MALLOC, malloc, malloc);
#elif defined(VGO_darwin)
ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc, malloc);
- ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_zone_malloc, malloc);
+ ALLOC_or_NULL(SO_SYN_MALLOC, malloc, malloc);
+ ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_zone_malloc, malloc);
+ ZONEALLOC_or_NULL(SO_SYN_MALLOC, malloc_zone_malloc, malloc);
#endif
@@ -281,11 +288,13 @@
#if VG_WORDSIZE == 4
ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwj, __builtin_new);
ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwj, __builtin_new);
+ ALLOC_or_BOMB(SO_SYN_MALLOC, _Znwj, __builtin_new);
#endif
// operator new(unsigned long), GNU mangling
#if VG_WORDSIZE == 8
ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwm, __builtin_new);
ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwm, __builtin_new);
+ ALLOC_or_BOMB(SO_SYN_MALLOC, _Znwm, __builtin_new);
#endif
#elif defined(VGO_darwin)
@@ -310,11 +319,13 @@
#if VG_WORDSIZE == 4
ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwjRKSt9nothrow_t, __builtin_new);
ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwjRKSt9nothrow_t, __builtin_new);
+ ALLOC_or_NULL(SO_SYN_MALLOC, _ZnwjRKSt9nothrow_t, __builtin_new);
#endif
// operator new(unsigned long, std::nothrow_t const&), GNU mangling
#if VG_WORDSIZE == 8
ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwmRKSt9nothrow_t, __builtin_new);
ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwmRKSt9nothrow_t, __builtin_new);
+ ALLOC_or_NULL(SO_SYN_MALLOC, _ZnwmRKSt9nothrow_t, __builtin_new);
#endif
#elif defined(VGO_darwin)
@@ -342,11 +353,13 @@
#if VG_WORDSIZE == 4
ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znaj, __builtin_vec_new );
ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znaj, __builtin_vec_new );
+ ALLOC_or_BOMB(SO_SYN_MALLOC, _Znaj, __builtin_vec_new );
#endif
// operator new[](unsigned long), GNU mangling
#if VG_WORDSIZE == 8
ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znam, __builtin_vec_new );
ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znam, __builtin_vec_new );
+ ALLOC_or_BOMB(SO_SYN_MALLOC, _Znam, __builtin_vec_new );
#endif
#elif defined(VGO_darwin)
@@ -371,11 +384,13 @@
#if VG_WORDSIZE == 4
ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnajRKSt9nothrow_t, __builtin_vec_new );
ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnajRKSt9nothrow_t, __builtin_vec_new );
+ ALLOC_or_NULL(SO_SYN_MALLOC, _ZnajRKSt9nothrow_t, __builtin_vec_new );
#endif
// operator new[](unsigned long, std::nothrow_t const&), GNU mangling
#if VG_WORDSIZE == 8
ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnamRKSt9nothrow_t, __builtin_vec_new );
ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnamRKSt9nothrow_t, __builtin_vec_new );
+ ALLOC_or_NULL(SO_SYN_MALLOC, _ZnamRKSt9nothrow_t, __builtin_vec_new );
#endif
#elif defined(VGO_darwin)
@@ -422,13 +437,17 @@
(void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \
}
+
#if defined(VGO_linux)
FREE(VG_Z_LIBSTDCXX_SONAME, free, free );
FREE(VG_Z_LIBC_SONAME, free, free );
+ FREE(SO_SYN_MALLOC, free, free );
#elif defined(VGO_darwin)
FREE(VG_Z_LIBC_SONAME, free, free );
+ FREE(SO_SYN_MALLOC, free, free );
ZONEFREE(VG_Z_LIBC_SONAME, malloc_zone_free, free );
+ ZONEFREE(SO_SYN_MALLOC, malloc_zone_free, free );
#endif
@@ -439,6 +458,7 @@
#if defined(VGO_linux)
FREE(VG_Z_LIBSTDCXX_SONAME, cfree, free );
FREE(VG_Z_LIBC_SONAME, cfree, free );
+ FREE(SO_SYN_MALLOC, cfree, free );
#elif defined(VGO_darwin)
//FREE(VG_Z_LIBSTDCXX_SONAME, cfree, free );
@@ -456,6 +476,7 @@
// operator delete(void*), GNU mangling
FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPv, __builtin_delete );
FREE(VG_Z_LIBC_SONAME, _ZdlPv, __builtin_delete );
+ FREE(SO_SYN_MALLOC, _ZdlPv, __builtin_delete );
#elif defined(VGO_darwin)
// operator delete(void*), GNU mangling
@@ -471,6 +492,7 @@
// operator delete(void*, std::nothrow_t const&), GNU mangling
FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
FREE(VG_Z_LIBC_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
+ FREE(SO_SYN_MALLOC, _ZdlPvRKSt9nothrow_t, __builtin_delete );
#elif defined(VGO_darwin)
// operator delete(void*, std::nothrow_t const&), GNU mangling
@@ -489,6 +511,7 @@
// operator delete[](void*), GNU mangling
FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPv, __builtin_vec_delete );
FREE(VG_Z_LIBC_SONAME, _ZdaPv, __builtin_vec_delete );
+ FREE(SO_SYN_MALLOC, _ZdaPv, __builtin_vec_delete );
#elif defined(VGO_darwin)
// operator delete[](void*), not mangled (for gcc 2.96)
@@ -507,6 +530,7 @@
// operator delete[](void*, std::nothrow_t const&), GNU mangling
FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
FREE(VG_Z_LIBC_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
+ FREE(SO_SYN_MALLOC, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
#elif defined(VGO_darwin)
// operator delete[](void*, std::nothrow_t const&), GNU mangling
@@ -564,10 +588,13 @@
#if defined(VGO_linux)
CALLOC(VG_Z_LIBC_SONAME, calloc);
+ CALLOC(SO_SYN_MALLOC, calloc);
#elif defined(VGO_darwin)
CALLOC(VG_Z_LIBC_SONAME, calloc);
+ CALLOC(SO_SYN_MALLOC, calloc);
ZONECALLOC(VG_Z_LIBC_SONAME, malloc_zone_calloc);
+ ZONECALLOC(SO_SYN_MALLOC, malloc_zone_calloc);
#endif
@@ -630,10 +657,13 @@
#if defined(VGO_linux)
REALLOC(VG_Z_LIBC_SONAME, realloc);
+ REALLOC(SO_SYN_MALLOC, realloc);
#elif defined(VGO_darwin)
REALLOC(VG_Z_LIBC_SONAME, realloc);
+ REALLOC(SO_SYN_MALLOC, realloc);
ZONEREALLOC(VG_Z_LIBC_SONAME, malloc_zone_realloc);
+ ZONEREALLOC(SO_SYN_MALLOC, malloc_zone_realloc);
#endif
@@ -692,10 +722,13 @@
#if defined(VGO_linux)
MEMALIGN(VG_Z_LIBC_SONAME, memalign);
+ MEMALIGN(SO_SYN_MALLOC, memalign);
#elif defined(VGO_darwin)
MEMALIGN(VG_Z_LIBC_SONAME, memalign);
+ MEMALIGN(SO_SYN_MALLOC, memalign);
ZONEMEMALIGN(VG_Z_LIBC_SONAME, malloc_zone_memalign);
+ ZONEMEMALIGN(SO_SYN_MALLOC, malloc_zone_memalign);
#endif
@@ -730,10 +763,13 @@
#if defined(VGO_linux)
VALLOC(VG_Z_LIBC_SONAME, valloc);
+ VALLOC(SO_SYN_MALLOC, valloc);
#elif defined(VGO_darwin)
VALLOC(VG_Z_LIBC_SONAME, valloc);
+ VALLOC(SO_SYN_MALLOC, valloc);
ZONEVALLOC(VG_Z_LIBC_SONAME, malloc_zone_valloc);
+ ZONEVALLOC(SO_SYN_MALLOC, malloc_zone_valloc);
#endif
@@ -754,6 +790,7 @@
#if defined(VGO_linux)
MALLOPT(VG_Z_LIBC_SONAME, mallopt);
+ MALLOPT(SO_SYN_MALLOC, mallopt);
#elif defined(VGO_darwin)
//MALLOPT(VG_Z_LIBC_SONAME, mallopt);
@@ -796,6 +833,7 @@
#if defined(VGO_linux)
MALLOC_TRIM(VG_Z_LIBC_SONAME, malloc_trim);
+ MALLOC_TRIM(SO_SYN_MALLOC, malloc_trim);
#elif defined(VGO_darwin)
//MALLOC_TRIM(VG_Z_LIBC_SONAME, malloc_trim);
@@ -833,6 +871,7 @@
#if defined(VGO_linux)
POSIX_MEMALIGN(VG_Z_LIBC_SONAME, posix_memalign);
+ POSIX_MEMALIGN(SO_SYN_MALLOC, posix_memalign);
#elif defined(VGO_darwin)
//POSIX_MEMALIGN(VG_Z_LIBC_SONAME, posix_memalign);
@@ -862,14 +901,18 @@
#if defined(VGO_linux)
MALLOC_USABLE_SIZE(VG_Z_LIBC_SONAME, malloc_usable_size);
+ MALLOC_USABLE_SIZE(SO_SYN_MALLOC, malloc_usable_size);
MALLOC_USABLE_SIZE(VG_Z_LIBC_SONAME, malloc_size);
+ MALLOC_USABLE_SIZE(SO_SYN_MALLOC, malloc_size);
# if defined(VGPV_arm_linux_android)
MALLOC_USABLE_SIZE(VG_Z_LIBC_SONAME, dlmalloc_usable_size);
+ MALLOC_USABLE_SIZE(SO_SYN_MALLOC, dlmalloc_usable_size);
# endif
#elif defined(VGO_darwin)
//MALLOC_USABLE_SIZE(VG_Z_LIBC_SONAME, malloc_usable_size);
MALLOC_USABLE_SIZE(VG_Z_LIBC_SONAME, malloc_size);
+ MALLOC_USABLE_SIZE(SO_SYN_MALLOC, malloc_size);
#endif
@@ -916,6 +959,7 @@
#if defined(VGO_linux)
MALLOC_STATS(VG_Z_LIBC_SONAME, malloc_stats);
+ MALLOC_STATS(SO_SYN_MALLOC, malloc_stats);
#elif defined(VGO_darwin)
//MALLOC_STATS(VG_Z_LIBC_SONAME, malloc_stats);
@@ -942,6 +986,7 @@
#if defined(VGO_linux)
MALLINFO(VG_Z_LIBC_SONAME, mallinfo);
+ MALLINFO(SO_SYN_MALLOC, mallinfo);
#elif defined(VGO_darwin)
//MALLINFO(VG_Z_LIBC_SONAME, mallinfo);
@@ -996,6 +1041,7 @@
}
DEFAULT_ZONE(VG_Z_LIBC_SONAME, malloc_default_zone);
+DEFAULT_ZONE(SO_SYN_MALLOC, malloc_default_zone);
#define ZONE_FROM_PTR(soname, fnname) \
@@ -1007,6 +1053,7 @@
}
ZONE_FROM_PTR(VG_Z_LIBC_SONAME, malloc_zone_from_ptr);
+ZONE_FROM_PTR(SO_SYN_MALLOC, malloc_zone_from_ptr);
// GrP fixme bypass libc's use of zone->introspect->check
Added: trunk/memcheck/tests/static_malloc.c (+21 -0)
===================================================================
--- trunk/memcheck/tests/static_malloc.c 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/memcheck/tests/static_malloc.c 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+static char buf[10000];
+static int bufi = 0;
+void* malloc(size_t i) {
+ bufi += i;
+ return buf + bufi - i;
+}
+
+void free(void*ptr) {
+}
+
+int main (void)
+{
+ char *p;
+ p = malloc(10);
+ p = malloc(123);
+ free(p);
+ return 0;
+}
+
Modified: trunk/coregrind/m_redir.c (+54 -0)
===================================================================
--- trunk/coregrind/m_redir.c 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/coregrind/m_redir.c 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -367,6 +367,18 @@
dinfo_free(names);
}
+static HChar const* advance_to_equal ( HChar const* c ) {
+ while (*c && *c != '=') {
+ ++c;
+ }
+ return c;
+}
+static HChar const* advance_to_comma ( HChar const* c ) {
+ while (*c && *c != ',') {
+ ++c;
+ }
+ return c;
+}
/* Notify m_redir of the arrival of a new DebugInfo. This is fairly
complex, but the net effect is to (1) add a new entry to the
@@ -516,6 +528,48 @@
the following loop, and complain at that point. */
continue;
}
+
+ if (0 == VG_(strncmp) (demangled_sopatt,
+ VG_SO_SYN_PREFIX, VG_SO_SYN_PREFIX_LEN)) {
+ /* This is a redirection for handling lib so synonyms. If we
+ have a matching lib synonym, then replace the sopatt.
+ Otherwise, just ignore this redirection spec. */
+
+ if (!VG_(clo_soname_synonyms))
+ continue; // No synonyms => skip the redir.
+
+ /* Search for a matching synonym=newname*/
+ SizeT const sopatt_syn_len
+ = VG_(strlen)(demangled_sopatt+VG_SO_SYN_PREFIX_LEN);
+ HChar const* last = VG_(clo_soname_synonyms);
+
+ while (*last) {
+ HChar const* first = last;
+ last = advance_to_equal(first);
+
+ if ((last - first) == sopatt_syn_len
+ && 0 == VG_(strncmp)(demangled_sopatt+VG_SO_SYN_PREFIX_LEN,
+ first,
+ sopatt_syn_len)) {
+ // Found the demangle_sopatt synonym => replace it
+ first = last + 1;
+ last = advance_to_comma(first);
+ VG_(strncpy)(demangled_sopatt, first, last - first);
+ demangled_sopatt[last - first] = '\0';
+ break;
+ }
+
+ last = advance_to_comma(last);
+ if (*last == ',')
+ last++;
+ }
+
+ // If we have not replaced the sopatt, then skip the redir.
+ if (0 == VG_(strncmp) (demangled_sopatt,
+ VG_SO_SYN_PREFIX, VG_SO_SYN_PREFIX_LEN))
+ continue;
+ }
+
spec = dinfo_zalloc("redir.rnnD.1", sizeof(Spec));
vg_assert(spec);
spec->from_sopatt = dinfo_strdup("redir.rnnD.2", demangled_sopatt);
Modified: trunk/coregrind/m_options.c (+1 -0)
===================================================================
--- trunk/coregrind/m_options.c 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/coregrind/m_options.c 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -66,6 +66,7 @@
Bool VG_(clo_xml) = False;
HChar* VG_(clo_xml_user_comment) = NULL;
Bool VG_(clo_demangle) = True;
+HChar* VG_(clo_soname_synonyms) = NULL;
Bool VG_(clo_trace_children) = False;
HChar* VG_(clo_trace_children_skip) = NULL;
HChar* VG_(clo_trace_children_skip_by_arg) = NULL;
Modified: trunk/NEWS (+17 -4)
===================================================================
--- trunk/NEWS 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/NEWS 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -3,17 +3,22 @@
* ================== PLATFORM CHANGES =================
-* Support for amd64 AES instructions (AESKEYGENASSIST, AESENC, AESENCLAST,
- AESDEC, AESDECLAST, AESIMC).
+* Support for intel AES instructions (AESKEYGENASSIST, AESENC, AESENCLAST,
+ AESDEC, AESDECLAST, AESIMC). Only supported for 64 bit architecture.
* ==================== TOOL CHANGES ====================
+* Massif
+ - Using the new option --soname-synonyms, Massif can now understand
+ a program using statically linked malloc or using alternative
+ malloc libraries (such as tcmalloc).
+
* Memcheck:
- The leak_check GDB server monitor command now can
control the maximum nr of loss records to output.
- - reduction of memory use for applications allocating
+ - Reduction of memory use for applications allocating
many blocks and/or having many partially defined bytes.
- Addition of GDB server monitor command 'block_list' that lists
@@ -22,15 +27,22 @@
- Addition of GDB server monitor command 'who_points_at' that lists
the locations pointing at a block.
- - if a redzone size > 0 is given, VALGRIND_MALLOCLIKE_BLOCK now
+ - If a redzone size > 0 is given, VALGRIND_MALLOCLIKE_BLOCK now
will detect an invalid access of these redzones, by marking them
noaccess.
+ - Using the new option --soname-synonyms, Memcheck can now understand
+ a program using statically linked malloc or using alternative
+ malloc libraries (such as tcmalloc).
+
* ==================== OTHER CHANGES ====================
* The C++ demangler has been updated so as to work well with C++
compiled by up to at least g++ 4.6.
+* Replacement/wrapping can be made more flexible thanks to the new option
+ --soname-synonyms.
+
* The new option --fair-sched allows to control the locking mechanism
used by Valgrind. The locking mechanism influences the performance
and scheduling of multithreaded applications (in particular
@@ -56,6 +68,7 @@
where XXXXXX is the bug number as listed below.
197914 Building valgrind from svn now requires automake-1.10
+219156 Valgrind does not handle statically linked malloc or other malloc lib (e.g. tcmalloc)
247386 make perf does not run all performance tests
270006 Valgrind scheduler unfair
270796 s390x: Removed broken support for the TS insn
Added: trunk/memcheck/tests/static_malloc.vgtest (+2 -0)
===================================================================
--- trunk/memcheck/tests/static_malloc.vgtest 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/memcheck/tests/static_malloc.vgtest 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -0,0 +1,2 @@
+prog: static_malloc
+vgopts: -q --leak-check=full --soname-synonyms=somalloc=NONE
Added: trunk/memcheck/tests/static_malloc.stderr.exp (+4 -0)
===================================================================
--- trunk/memcheck/tests/static_malloc.stderr.exp 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/memcheck/tests/static_malloc.stderr.exp 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -0,0 +1,4 @@
+10 bytes in 1 blocks are definitely lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (static_malloc.c:16)
+
Modified: trunk/memcheck/tests/Makefile.am (+2 -1)
===================================================================
--- trunk/memcheck/tests/Makefile.am 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/memcheck/tests/Makefile.am 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -178,6 +178,7 @@
sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.vgtest \
signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
+ static_malloc.stderr.exp static_malloc.vgtest \
strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \
strchr.vgtest \
str_tester.stderr.exp str_tester.vgtest \
@@ -268,7 +269,7 @@
realloc1 realloc2 realloc3 \
sbfragment \
sh-mem sh-mem-random \
- sigaltstack signal2 sigprocmask sigkill \
+ sigaltstack signal2 sigprocmask static_malloc sigkill \
strchr \
str_tester \
supp_unknown supp1 supp2 suppfree \
Modified: trunk/none/tests/cmdline2.stdout.exp (+3 -0)
===================================================================
--- trunk/none/tests/cmdline2.stdout.exp 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/none/tests/cmdline2.stdout.exp 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -80,6 +80,9 @@
--require-text-symbol=:sonamepattern:symbolpattern abort run if the
stated shared object doesn't have the stated
text symbol. Patterns can contain ? and *.
+ --soname-synonyms=syn1=pattern1,syn2=pattern2,... synonym soname
+ patterns for some Valgrind wrapping
+ or replacement (such as malloc replacement)
user options for Nulgrind:
(none)
Modified: trunk/coregrind/m_main.c (+4 -0)
===================================================================
--- trunk/coregrind/m_main.c 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/coregrind/m_main.c 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -187,6 +187,9 @@
" --require-text-symbol=:sonamepattern:symbolpattern abort run if the\n"
" stated shared object doesn't have the stated\n"
" text symbol. Patterns can contain ? and *.\n"
+" --soname-synonyms=syn1=pattern1,syn2=pattern2,... synonym soname\n"
+" patterns for some Valgrind wrapping\n"
+" or replacement (such as malloc replacement)\n"
"\n";
Char* usage2 =
@@ -483,6 +486,7 @@
VG_(clo_vgdb_shadow_registers)) {}
else if VG_BOOL_CLO(arg, "--db-attach", VG_(clo_db_attach)) {}
else if VG_BOOL_CLO(arg, "--demangle", VG_(clo_demangle)) {}
+ else if VG_STR_CLO (arg, "--soname-synonyms",VG_(clo_soname_synonyms)) {}
else if VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit)) {}
else if VG_INT_CLO (arg, "--error-exitcode", VG_(clo_error_exitcode)) {}
else if VG_BOOL_CLO(arg, "--show-emwarns", VG_(clo_show_emwarns)) {}
Modified: trunk/none/tests/cmdline1.stdout.exp (+3 -0)
===================================================================
--- trunk/none/tests/cmdline1.stdout.exp 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/none/tests/cmdline1.stdout.exp 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -80,6 +80,9 @@
--require-text-symbol=:sonamepattern:symbolpattern abort run if the
stated shared object doesn't have the stated
text symbol. Patterns can contain ? and *.
+ --soname-synonyms=syn1=pattern1,syn2=pattern2,... synonym soname
+ patterns for some Valgrind wrapping
+ or replacement (such as malloc replacement)
user options for Nulgrind:
(none)
Modified: trunk/docs/xml/manual-core.xml (+56 -0)
===================================================================
--- trunk/docs/xml/manual-core.xml 2012-05-10 00:09:05 -23:00 (rev 12558)
+++ trunk/docs/xml/manual-core.xml 2012-05-11 20:33:46 +01:00 (rev 12559)
@@ -1787,7 +1787,63 @@
</listitem>
</varlistentry>
+ <varlistentry id="opt.soname-synonyms"
+ xreflabel="--soname-synonyms">
+ <term>
+ <option><![CDATA[--soname-synonyms=syn1=pattern1,syn2=pattern2,...]]></option>
+ </term>
+ <listitem>
+ <para>When a shared library is loaded, Valgrind examines if some
+ functions of this library must be replaced or wrapped.
+ For example, memcheck is replacing the malloc related
+ functions (malloc, free, calloc, ...).
+ Such replacements are done by default only in shared libraries whose
+ soname matches a predefined soname pattern (e.g.
+ <varname>libc.so*</varname> on linux).
+ By default, no replacement is done for a statically linked
+ library or for alternative libraries such as tcmalloc.
+ In some cases, the replacements allow
+ <option>--soname-synonyms</option> to specify one additional
+ synonym pattern, giving flexibility in the replacement. </para>
+ <para> Currently, this flexibility is only allowed for the
+ malloc related functions, using the
+ synonym <varname>somalloc</varname>. This synonym is usable for
+ all tools doing standard replacement of malloc related functions
+ (e.g. memcheck, massif, drd, helgrind, exp-dhat, exp-sgcheck).
+ </para>
+
+ <itemizedlist>
+ <listitem>
+
+ <para>Alternate malloc library: to replace the malloc
+ related functions in an alternate library with
+ soname <varname>mymalloclib.so</varname>, give the
+ option <option>--soname-synonyms=somalloc=mymalloclib.so</option>.
+ A pattern can be used to match multiple libraries sonames.
+ For
+ example, <option>--soname-synonyms=somalloc=*tcmalloc*</option>
+ will match the soname of all variants of the tcmalloc library
+ (native, debug, profiled, ... tcmalloc variants). </para>
+ <para>Note: the soname of a elf shared library can be
+ retrieved using the readelf utility. </para>
+
+ </listitem>
+
+ <listitem>
+ <para>Replacements in a statically linked library are done by
+ using the <varname>NONE</varname> pattern. For example, if
+ you link with <varname>libtcmalloc.a</varname>, memcheck
+ will properly work when you give the
+ option <option>--soname-synonyms=somalloc=NONE</option>. Note
+ that a NONE pattern will match the main executable and any
+ shared library having no soname. </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+
+
</variablelist>
<!-- end of xi:include in the manpage -->
|
|
From: Julian S. <js...@ac...> - 2012-05-11 07:57:17
|
On Friday, May 11, 2012, Philippe Waroquiers wrote: > I can take in charge looking the patch of Dave, and adding > the relevant sentences in the documentation and/or headers. Yes, please do. (kind-of unrelated) There's also a configure script change from Dave w.r.t. MPI, that we should take, #274078 I think. J |