|
From: <sv...@va...> - 2007-12-04 21:18:05
|
Author: njn
Date: 2007-12-04 21:18:06 +0000 (Tue, 04 Dec 2007)
New Revision: 7274
Log:
Remove client requests that were deprecated in 3.2.0.
Modified:
trunk/NEWS
trunk/memcheck/memcheck.h
trunk/memcheck/tests/leak-pool.c
trunk/memcheck/tests/sh-mem-random.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-12-04 16:12:54 UTC (rev 7273)
+++ trunk/NEWS 2007-12-04 21:18:06 UTC (rev 7274)
@@ -128,6 +128,16 @@
they just return 3 (as before). Also, SET_VBITS doesn't report
definedness errors if any of the V bits are undefined.
+- The following Memcheck client requests have been removed:
+ VALGRIND_MAKE_NOACCESS
+ VALGRIND_MAKE_WRITABLE
+ VALGRIND_MAKE_READABLE
+ VALGRIND_CHECK_WRITABLE
+ VALGRIND_CHECK_READABLE
+ VALGRIND_CHECK_DEFINED
+ They were deprecated in 3.2.0, when equivalent but better-named client
+ requests were added. See the 3.2.0 release notes for more details.
+
- The behaviour of the tool Lackey has changed slightly. First, the output
from --trace-mem has been made more compact, to reduce the size of the
traces. Second, a new option --trace-superblocks has been added, which
Modified: trunk/memcheck/memcheck.h
===================================================================
--- trunk/memcheck/memcheck.h 2007-12-04 16:12:54 UTC (rev 7273)
+++ trunk/memcheck/memcheck.h 2007-12-04 21:18:06 UTC (rev 7274)
@@ -131,18 +131,6 @@
_qzz_res; \
}))
-/* This is the old name for VALGRIND_MAKE_MEM_NOACCESS. Deprecated. */
-#define VALGRIND_MAKE_NOACCESS(_qzz_addr,_qzz_len) \
- VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len)
-
-/* This is the old name for VALGRIND_MAKE_MEM_UNDEFINED. Deprecated. */
-#define VALGRIND_MAKE_WRITABLE(_qzz_addr,_qzz_len) \
- VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len)
-
-/* This is the old name for VALGRIND_MAKE_MEM_DEFINED. Deprecated. */
-#define VALGRIND_MAKE_READABLE(_qzz_addr,_qzz_len) \
- VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len)
-
/* Similar to VALGRIND_MAKE_MEM_DEFINED except that addressability is
not altered: bytes which are addressable are marked as defined,
but those which are not addressable are left unchanged. */
@@ -214,19 +202,7 @@
(volatile unsigned char *)&(__lvalue), \
(unsigned int)(sizeof (__lvalue)))
-/* This is the old name for VALGRIND_CHECK_MEM_IS_ADDRESSABLE. Deprecated. */
-#define VALGRIND_CHECK_WRITABLE(_qzz_addr,_qzz_len) \
- VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len)
-/* This is the old name for VALGRIND_CHECK_MEM_IS_DEFINED. Deprecated. */
-#define VALGRIND_CHECK_READABLE(_qzz_addr,_qzz_len) \
- VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len)
-
-/* This is the old name for VALGRIND_CHECK_VALUE_IS_DEFINED. Deprecated. */
-#define VALGRIND_CHECK_DEFINED(__lvalue) \
- VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue)
-
-
/* Do a memory leak check mid-execution. */
#define VALGRIND_DO_LEAK_CHECK \
{unsigned int _qzz_res; \
Modified: trunk/memcheck/tests/leak-pool.c
===================================================================
--- trunk/memcheck/tests/leak-pool.c 2007-12-04 16:12:54 UTC (rev 7273)
+++ trunk/memcheck/tests/leak-pool.c 2007-12-04 21:18:06 UTC (rev 7274)
@@ -40,7 +40,7 @@
assert(p->buf);
memset(p->buf, 0, p->allocated);
VALGRIND_CREATE_MEMPOOL(p, 0, 0);
- VALGRIND_MAKE_NOACCESS(p->buf, p->allocated);
+ VALGRIND_MAKE_MEM_NOACCESS(p->buf, p->allocated);
return p;
}
Modified: trunk/memcheck/tests/sh-mem-random.c
===================================================================
--- trunk/memcheck/tests/sh-mem-random.c 2007-12-04 16:12:54 UTC (rev 7273)
+++ trunk/memcheck/tests/sh-mem-random.c 2007-12-04 21:18:06 UTC (rev 7274)
@@ -40,7 +40,7 @@
U8 mask = 0;
U8 shres;
U8 res = 0xffffffffffffffffULL, res2;
- VALGRIND_MAKE_WRITABLE(&res, 8);
+ VALGRIND_MAKE_MEM_UNDEFINED(&res, 8);
assert(1 == size || 2 == size || 4 == size || 8 == size);
for (i = 0; i < size; i++) {
@@ -55,7 +55,7 @@
VALGRIND_GET_VBITS(&res, &shres, 8);
res2 = res;
- VALGRIND_MAKE_READABLE(&res2, 8); // avoid the 'undefined' warning
+ VALGRIND_MAKE_MEM_DEFINED(&res2, 8); // avoid the 'undefined' warning
assert(res2 == shres);
return res;
}
@@ -63,7 +63,7 @@
U1 make_defined ( U1 x )
{
volatile U1 xx = x;
- VALGRIND_MAKE_READABLE(&xx, 1);
+ VALGRIND_MAKE_MEM_DEFINED(&xx, 1);
return xx;
}
|
|
From: Dirk M. <dm...@gm...> - 2007-12-16 14:50:09
|
On Tuesday 04 December 2007, sv...@va... wrote: > Author: njn > Date: 2007-12-04 21:18:06 +0000 (Tue, 04 Dec 2007) > New Revision: 7274 > > Log: > Remove client requests that were deprecated in 3.2.0. was it really necessary to break applications depending on those macros (which have not even been -Wdeprecated!) between RC1 and final? They did not even introduce any overhead. Dirk |
|
From: Nicholas N. <nj...@cs...> - 2007-12-16 18:51:04
|
On Sun, 16 Dec 2007, Dirk Mueller wrote: >> Log: >> Remove client requests that were deprecated in 3.2.0. > > was it really necessary to break applications depending on those macros (which > have not even been -Wdeprecated!) between RC1 and final? > > They did not even introduce any overhead. I didn't know about the 'deprecated' attribute, thanks for the tip. In this case, I don't think we could have used it because they were macros. Well, I guess we could have factored out the relevant code deeper within Memcheck intro functions, but that would have required duplicating real code to distinguish between the deprecated and non-deprecated versions. These macros were marked as deprecated in the 3.2.0 release notes, so there was considerable warning. Sorry for the inconvenience. Nick |
|
From: Dirk M. <dm...@gm...> - 2007-12-19 13:24:52
|
On Sunday 16 December 2007, Nicholas Nethercote wrote: > I didn't know about the 'deprecated' attribute, thanks for the tip. In > this case, I don't think we could have used it because they were macros. I think it would be possible to convert them into static inlines though. > These macros were marked as deprecated in the 3.2.0 release notes, so there > was considerable warning. there is not an easy way for projects to reestablish backward compatibility, other than adding a #ifndef old_macro.. hmm, which would break again for the static inlines idea. *sigh* Anyway, we should not do such changes anymore after RC1, which people use for testing. Greetings, Dirk |