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
(5) |
2
(4) |
3
(8) |
4
(11) |
5
(23) |
|
6
(14) |
7
(17) |
8
(10) |
9
(8) |
10
(13) |
11
(10) |
12
(15) |
|
13
(12) |
14
(8) |
15
(15) |
16
(10) |
17
(19) |
18
(10) |
19
(5) |
|
20
(9) |
21
(8) |
22
(7) |
23
(4) |
24
(15) |
25
(6) |
26
(11) |
|
27
(5) |
28
(11) |
29
(9) |
30
(9) |
31
(4) |
|
|
|
From: Christian B. <bor...@de...> - 2011-03-25 21:35:49
|
Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z10 (s390x) ) Started at 2011-03-25 22:10:01 CET Ended at 2011-03-25 22:35:41 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 457 tests, 6 stderr failures, 0 stdout failures, 0 post failures == none/tests/faultstatus (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: Christian B. <bor...@de...> - 2011-03-25 21:31:06
|
Nightly build on fedora390 ( Fedora 13/14/15 mix with gcc 3.5.3 on z196 (s390x) ) Started at 2011-03-25 22:10:01 CET Ended at 2011-03-25 22:30:03 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 441 tests, 6 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/annotate_spinlock (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: <sv...@va...> - 2011-03-25 20:07:35
|
Author: bart
Date: 2011-03-25 20:07:25 +0000 (Fri, 25 Mar 2011)
New Revision: 11666
Log:
Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.
Modified:
trunk/coregrind/m_scheduler/scheduler.c
trunk/docs/xml/manual-core-adv.xml
trunk/drd/drd_clientreq.c
trunk/include/valgrind.h
trunk/massif/ms_main.c
trunk/memcheck/mc_errors.c
trunk/memcheck/mc_include.h
trunk/memcheck/mc_main.c
trunk/memcheck/mc_malloc_wrappers.c
trunk/memcheck/tests/badfree-2trace.stderr.exp
trunk/memcheck/tests/badfree.stderr.exp
trunk/memcheck/tests/badfree3.stderr.exp
trunk/memcheck/tests/custom_alloc.c
trunk/memcheck/tests/custom_alloc.stderr.exp
trunk/memcheck/tests/doublefree.stderr.exp
trunk/memcheck/tests/fprw.stderr.exp
trunk/memcheck/tests/malloc2.stderr.exp
trunk/memcheck/tests/memalign_test.stderr.exp
trunk/memcheck/tests/suppfree.stderr.exp
trunk/memcheck/tests/xml1.stderr.exp
Modified: trunk/coregrind/m_scheduler/scheduler.c
===================================================================
--- trunk/coregrind/m_scheduler/scheduler.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/coregrind/m_scheduler/scheduler.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1584,6 +1584,7 @@
}
case VG_USERREQ__MALLOCLIKE_BLOCK:
+ case VG_USERREQ__RESIZEINPLACE_BLOCK:
case VG_USERREQ__FREELIKE_BLOCK:
// Ignore them if the addr is NULL; otherwise pass onto the tool.
if (!arg[1]) {
Modified: trunk/docs/xml/manual-core-adv.xml
===================================================================
--- trunk/docs/xml/manual-core-adv.xml 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/docs/xml/manual-core-adv.xml 2011-03-25 20:07:25 UTC (rev 11666)
@@ -152,6 +152,15 @@
</varlistentry>
<varlistentry>
+ <term><command><computeroutput>VALGRIND_RESIZEINPLACE_BLOCK</computeroutput>:</command></term>
+ <listitem>
+ <para>Informs a Valgrind tool that the size of an allocated block has been
+ modified but not its address. See <filename>valgrind.h</filename> for
+ more information on how to use it.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>
<command><computeroutput>VALGRIND_CREATE_MEMPOOL</computeroutput></command>,
<command><computeroutput>VALGRIND_DESTROY_MEMPOOL</computeroutput></command>,
Modified: trunk/drd/drd_clientreq.c
===================================================================
--- trunk/drd/drd_clientreq.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/drd/drd_clientreq.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -97,6 +97,22 @@
DRD_(malloclike_block)(vg_tid, arg[1]/*addr*/, arg[2]/*size*/);
break;
+ case VG_USERREQ__RESIZEINPLACE_BLOCK:
+ if (!DRD_(freelike_block)(vg_tid, arg[1]/*addr*/, False))
+ {
+ GenericErrInfo GEI = {
+ .tid = DRD_(thread_get_running_tid)(),
+ .addr = 0,
+ };
+ VG_(maybe_record_error)(vg_tid,
+ GenericErr,
+ VG_(get_IP)(vg_tid),
+ "Invalid VG_USERREQ__RESIZEINPLACE_BLOCK request",
+ &GEI);
+ }
+ DRD_(malloclike_block)(vg_tid, arg[1]/*addr*/, arg[3]/*newSize*/);
+ break;
+
case VG_USERREQ__FREELIKE_BLOCK:
if (arg[1] && ! DRD_(freelike_block)(vg_tid, arg[1]/*addr*/, False))
{
Modified: trunk/include/valgrind.h
===================================================================
--- trunk/include/valgrind.h 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/include/valgrind.h 2011-03-25 20:07:25 UTC (rev 11666)
@@ -4846,6 +4846,7 @@
/* These are useful and can be interpreted by any tool that
tracks malloc() et al, by using vg_replace_malloc.c. */
VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
+ VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
VG_USERREQ__FREELIKE_BLOCK = 0x1302,
/* Memory pool support. */
VG_USERREQ__CREATE_MEMPOOL = 0x1303,
@@ -5178,7 +5179,24 @@
VALGRIND_FREELIKE_BLOCK should be put immediately after the point where a
heap block is deallocated.
- In many cases, these two client requests will not be enough to get your
+ VALGRIND_RESIZEINPLACE_BLOCK informs a tool about reallocation. For
+ Memcheck, it does four things:
+
+ - It records that the size of a block has been changed. This assumes that
+ the block was annotated as having been allocated via
+ VALGRIND_MALLOCLIKE_BLOCK. Otherwise, an error will be issued.
+
+ - If the block shrunk, it marks the freed memory as being unaddressable.
+
+ - If the block grew, it marks the new area as undefined and defines a red
+ zone past the end of the new block.
+
+ - The V-bits of the overlap between the old and the new block are preserved.
+
+ VALGRIND_RESIZEINPLACE_BLOCK should be put after allocation of the new block
+ and before deallocation of the old block.
+
+ In many cases, these three client requests will not be enough to get your
allocator working well with Memcheck. More specifically, if your allocator
writes to freed blocks in any way then a VALGRIND_MAKE_MEM_UNDEFINED call
will be necessary to mark the memory as addressable just before the zeroing
@@ -5196,9 +5214,6 @@
understand the distinction between the allocator and the rest of the
program.
- Note: there is currently no VALGRIND_REALLOCLIKE_BLOCK client request; it
- has to be emulated with MALLOCLIKE/FREELIKE and memory copying.
-
Ignored if addr == 0.
*/
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) \
@@ -5211,6 +5226,16 @@
/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.
Ignored if addr == 0.
*/
+#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB)\
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__RESIZEINPLACE_BLOCK, \
+ addr, oldSizeB, newSizeB, rzB, 0); \
+ }
+
+/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.
+ Ignored if addr == 0.
+*/
#define VALGRIND_FREELIKE_BLOCK(addr, rzB) \
{unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/massif/ms_main.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1988,6 +1988,15 @@
*ret = 0;
return True;
}
+ case VG_USERREQ__RESIZEINPLACE_BLOCK: {
+ void* p = (void*)argv[1];
+ SizeT newSizeB = argv[3];
+
+ unrecord_block(p, /*maybe_snapshot*/True);
+ record_block(tid, p, newSizeB, /*slop_szB*/0,
+ /*exclude_first_entry*/False, /*maybe_snapshot*/True);
+ return True;
+ }
case VG_USERREQ__FREELIKE_BLOCK: {
void* p = (void*)argv[1];
unrecord_block(p, /*maybe_snapshot*/True);
Modified: trunk/memcheck/mc_errors.c
===================================================================
--- trunk/memcheck/mc_errors.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/mc_errors.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -582,12 +582,13 @@
case Err_Free:
if (xml) {
emit( " <kind>InvalidFree</kind>\n" );
- emit( " <what>Invalid free() / delete / delete[]</what>\n" );
+ emit( " <what>Invalid free() / delete / delete[]"
+ " / realloc()</what>\n" );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
mc_pp_AddrInfo( VG_(get_error_address)(err),
&extra->Err.Free.ai, False );
} else {
- emit( "Invalid free() / delete / delete[]\n" );
+ emit( "Invalid free() / delete / delete[] / realloc()\n" );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
mc_pp_AddrInfo( VG_(get_error_address)(err),
&extra->Err.Free.ai, False );
Modified: trunk/memcheck/mc_include.h
===================================================================
--- trunk/memcheck/mc_include.h 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/mc_include.h 2011-03-25 20:07:25 UTC (rev 11666)
@@ -127,7 +127,10 @@
void* MC_(realloc) ( ThreadId tid, void* p, SizeT new_size );
SizeT MC_(malloc_usable_size) ( ThreadId tid, void* p );
+void MC_(handle_resizeInPlace)(ThreadId tid, Addr p,
+ SizeT oldSizeB, SizeT newSizeB, SizeT rzB);
+
/*------------------------------------------------------------*/
/*--- Origin tracking translate-time support ---*/
/*------------------------------------------------------------*/
Modified: trunk/memcheck/mc_main.c
===================================================================
--- trunk/memcheck/mc_main.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/mc_main.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -4987,6 +4987,7 @@
if (!VG_IS_TOOL_USERREQ('M','C',arg[0])
&& VG_USERREQ__MALLOCLIKE_BLOCK != arg[0]
+ && VG_USERREQ__RESIZEINPLACE_BLOCK != arg[0]
&& VG_USERREQ__FREELIKE_BLOCK != arg[0]
&& VG_USERREQ__CREATE_MEMPOOL != arg[0]
&& VG_USERREQ__DESTROY_MEMPOOL != arg[0]
@@ -5121,6 +5122,15 @@
MC_AllocCustom, MC_(malloc_list) );
return True;
}
+ case VG_USERREQ__RESIZEINPLACE_BLOCK: {
+ Addr p = (Addr)arg[1];
+ SizeT oldSizeB = arg[2];
+ SizeT newSizeB = arg[3];
+ UInt rzB = arg[4];
+
+ MC_(handle_resizeInPlace) ( tid, p, oldSizeB, newSizeB, rzB );
+ return True;
+ }
case VG_USERREQ__FREELIKE_BLOCK: {
Addr p = (Addr)arg[1];
UInt rzB = arg[2];
Modified: trunk/memcheck/mc_malloc_wrappers.c
===================================================================
--- trunk/memcheck/mc_malloc_wrappers.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/mc_malloc_wrappers.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -486,7 +486,38 @@
return ( mc ? mc->szB : 0 );
}
+/* This handles the in place resize of a block, as performed by the
+ VALGRIND_RESIZEINPLACE_BLOCK client request. It is unrelated to,
+ and not used for, handling of the normal libc realloc()
+ function. */
+void MC_(handle_resizeInPlace)(ThreadId tid, Addr p,
+ SizeT oldSizeB, SizeT newSizeB, SizeT rzB)
+{
+ MC_Chunk* mc = VG_(HT_lookup) ( MC_(malloc_list), (UWord)p );
+ if (!mc || mc->szB != oldSizeB || newSizeB == 0) {
+ /* Reject if: p is not found, or oldSizeB is wrong,
+ or new block would be empty. */
+ MC_(record_free_error) ( tid, p );
+ return;
+ }
+ if (oldSizeB == newSizeB)
+ return;
+
+ mc->szB = newSizeB;
+ if (newSizeB < oldSizeB) {
+ MC_(make_mem_noaccess)( p + newSizeB, oldSizeB - newSizeB + rzB );
+ } else {
+ ExeContext* ec = VG_(record_ExeContext)(tid, 0/*first_ip_delta*/);
+ UInt ecu = VG_(get_ECU_from_ExeContext)(ec);
+ MC_(make_mem_undefined_w_otag)( p + oldSizeB, newSizeB - oldSizeB,
+ ecu | MC_OKIND_HEAP );
+ if (rzB > 0)
+ MC_(make_mem_noaccess)( p + newSizeB, rzB );
+ }
+}
+
+
/*------------------------------------------------------------*/
/*--- Memory pool stuff. ---*/
/*------------------------------------------------------------*/
Modified: trunk/memcheck/tests/badfree-2trace.stderr.exp
===================================================================
--- trunk/memcheck/tests/badfree-2trace.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/badfree-2trace.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,9 +1,9 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:12)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:15)
Address 0x........ is on thread 1's stack
Modified: trunk/memcheck/tests/badfree.stderr.exp
===================================================================
--- trunk/memcheck/tests/badfree.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/badfree.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,9 +1,9 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:12)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:15)
Address 0x........ is on thread 1's stack
Modified: trunk/memcheck/tests/badfree3.stderr.exp
===================================================================
--- trunk/memcheck/tests/badfree3.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/badfree3.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,9 +1,9 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (coregrind/vg_replace_malloc.c:...)
by 0x........: main (memcheck/tests/badfree.c:12)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (coregrind/vg_replace_malloc.c:...)
by 0x........: main (memcheck/tests/badfree.c:15)
Address 0x........ is on thread 1's stack
Modified: trunk/memcheck/tests/custom_alloc.c
===================================================================
--- trunk/memcheck/tests/custom_alloc.c 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/custom_alloc.c 2011-03-25 20:07:25 UTC (rev 11666)
@@ -53,10 +53,10 @@
// don't actually free any memory... but mark it as freed
VALGRIND_FREELIKE_BLOCK( p, RZ );
}
-#undef RZ
+
//-------------------------------------------------------------------------
// Rest
//-------------------------------------------------------------------------
@@ -78,6 +78,23 @@
array[9] = 8;
array[10] = 10; // invalid write (ok w/o MALLOCLIKE -- in superblock)
+ VALGRIND_RESIZEINPLACE_BLOCK(array, sizeof(int) * 10, sizeof(int) * 5, RZ);
+ array[4] = 7;
+ array[5] = 9; // invalid write
+
+ // Make the entire array defined again such that it can be verified whether
+ // the red zone is marked properly when resizing in place.
+ VALGRIND_MAKE_MEM_DEFINED(array, sizeof(int) * 10);
+
+ VALGRIND_RESIZEINPLACE_BLOCK(array, sizeof(int) * 5, sizeof(int) * 7, RZ);
+ if (array[5]) array[4]++; // uninitialized read of array[5]
+ array[5] = 11;
+ array[6] = 7;
+ array[7] = 8; // invalid write
+
+ // invalid realloc
+ VALGRIND_RESIZEINPLACE_BLOCK(array+1, sizeof(int) * 7, sizeof(int) * 8, RZ);
+
custom_free(array); // ok
custom_free((void*)0x1); // invalid free
@@ -101,3 +118,5 @@
// leak from make_leak()
}
+
+#undef RZ
Modified: trunk/memcheck/tests/custom_alloc.stderr.exp
===================================================================
--- trunk/memcheck/tests/custom_alloc.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/custom_alloc.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -4,21 +4,42 @@
at 0x........: custom_alloc (custom_alloc.c:47)
by 0x........: main (custom_alloc.c:76)
-Invalid free() / delete / delete[]
+Invalid write of size 4
+ at 0x........: main (custom_alloc.c:83)
+ Address 0x........ is 0 bytes after a block of size 20 alloc'd
+ at 0x........: custom_alloc (custom_alloc.c:47)
+ by 0x........: main (custom_alloc.c:76)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: main (custom_alloc.c:90)
+
+Invalid write of size 4
+ at 0x........: main (custom_alloc.c:93)
+ Address 0x........ is 0 bytes after a block of size 28 alloc'd
+ at 0x........: custom_alloc (custom_alloc.c:47)
+ by 0x........: main (custom_alloc.c:76)
+
+Invalid free() / delete / delete[] / realloc()
+ at 0x........: main (custom_alloc.c:96)
+ Address 0x........ is 4 bytes inside a block of size 28 alloc'd
+ at 0x........: custom_alloc (custom_alloc.c:47)
+ by 0x........: main (custom_alloc.c:76)
+
+Invalid free() / delete / delete[] / realloc()
at 0x........: custom_free (custom_alloc.c:54)
- by 0x........: main (custom_alloc.c:83)
+ by 0x........: main (custom_alloc.c:100)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Mismatched free() / delete / delete []
at 0x........: custom_free (custom_alloc.c:54)
- by 0x........: main (custom_alloc.c:86)
+ by 0x........: main (custom_alloc.c:103)
Address 0x........ is 0 bytes inside a block of size 40 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (custom_alloc.c:85)
+ by 0x........: main (custom_alloc.c:102)
Invalid read of size 4
- at 0x........: main (custom_alloc.c:89)
- Address 0x........ is 0 bytes inside a block of size 40 free'd
+ at 0x........: main (custom_alloc.c:106)
+ Address 0x........ is 0 bytes inside a block of size 28 free'd
at 0x........: custom_free (custom_alloc.c:54)
- by 0x........: main (custom_alloc.c:81)
+ by 0x........: main (custom_alloc.c:98)
Modified: trunk/memcheck/tests/doublefree.stderr.exp
===================================================================
--- trunk/memcheck/tests/doublefree.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/doublefree.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,4 +1,4 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (doublefree.c:10)
Address 0x........ is 0 bytes inside a block of size 177 free'd
Modified: trunk/memcheck/tests/fprw.stderr.exp
===================================================================
--- trunk/memcheck/tests/fprw.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/fprw.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -28,7 +28,7 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (fprw.c:19)
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (fprw.c:22)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Modified: trunk/memcheck/tests/malloc2.stderr.exp
===================================================================
--- trunk/memcheck/tests/malloc2.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/malloc2.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -4,7 +4,7 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (malloc2.c:38)
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (malloc2.c:43)
Address 0x........ is 0 bytes inside a block of size 429 free'd
Modified: trunk/memcheck/tests/memalign_test.stderr.exp
===================================================================
--- trunk/memcheck/tests/memalign_test.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/memalign_test.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,4 +1,4 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (memalign_test.c:25)
Address 0x........ is 0 bytes inside a block of size 111,110 free'd
Modified: trunk/memcheck/tests/suppfree.stderr.exp
===================================================================
--- trunk/memcheck/tests/suppfree.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/suppfree.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -1,4 +1,4 @@
-Invalid free() / delete / delete[]
+Invalid free() / delete / delete[] / realloc()
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: ddd (suppfree.c:7)
by 0x........: ccc (suppfree.c:12)
Modified: trunk/memcheck/tests/xml1.stderr.exp
===================================================================
--- trunk/memcheck/tests/xml1.stderr.exp 2011-03-24 20:27:54 UTC (rev 11665)
+++ trunk/memcheck/tests/xml1.stderr.exp 2011-03-25 20:07:25 UTC (rev 11666)
@@ -198,7 +198,7 @@
<unique>0x........</unique>
<tid>...</tid>
<kind>InvalidFree</kind>
- <what>Invalid free() / delete / delete[]</what>
+ <what>Invalid free() / delete / delete[] / realloc()</what>
<stack>
<frame>
<ip>0x........</ip>
@@ -290,7 +290,7 @@
<unique>0x........</unique>
<tid>...</tid>
<kind>InvalidFree</kind>
- <what>Invalid free() / delete / delete[]</what>
+ <what>Invalid free() / delete / delete[] / realloc()</what>
<stack>
<frame>
<ip>0x........</ip>
|
|
From: Bart V. A. <bva...@ac...> - 2011-03-25 08:22:56
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2011-03-25 02:46:51 EDT Ended at 2011-03-25 04:22:43 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 457 tests, 12 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) callgrind/tests/simwork-both (stdout) callgrind/tests/simwork-both (stderr) callgrind/tests/simwork-branch (stdout) callgrind/tests/simwork-branch (stderr) none/tests/empty-exe (stderr) none/tests/faultstatus (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Tom H. <th...@cy...> - 2011-03-25 03:52:44
|
Nightly build on vauxhall ( x86_64, Fedora 14 ) Started at 2011-03-25 03:20:04 GMT Ended at 2011-03-25 03:52:17 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 553 tests, 4 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/origin5-bz2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) exp-ptrcheck/tests/bad_percentify (stderr) |
|
From: Tom H. <th...@cy...> - 2011-03-25 03:39:17
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2011-03-25 03:10:03 GMT Ended at 2011-03-25 03:38:56 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 572 tests, 3 stderr failures, 4 stdout failures, 0 post failures == none/tests/amd64/bug132918 (stdout) none/tests/amd64/fxtract (stdout) none/tests/amd64/sse4-64 (stdout) none/tests/x86/fxtract (stdout) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |