|
From: <sv...@va...> - 2008-02-26 19:53:09
|
Author: sewardj
Date: 2008-02-26 19:53:11 +0000 (Tue, 26 Feb 2008)
New Revision: 7485
Log:
Fix robustness problem in varinfo3.
Modified:
branches/DATASYMS/memcheck/tests/Makefile.am
branches/DATASYMS/memcheck/tests/varinfo3.c
branches/DATASYMS/memcheck/tests/varinfo3.stderr.exp
branches/DATASYMS/memcheck/tests/varinfo3.vgtest
Modified: branches/DATASYMS/memcheck/tests/Makefile.am
===================================================================
--- branches/DATASYMS/memcheck/tests/Makefile.am 2008-02-26 19:37:27 UTC (rev 7484)
+++ branches/DATASYMS/memcheck/tests/Makefile.am 2008-02-26 19:53:11 UTC (rev 7485)
@@ -19,7 +19,8 @@
DIST_SUBDIRS = ${VG_ARCH_ALL} .
noinst_SCRIPTS = filter_allocs filter_leak_check_size \
- filter_stderr filter_stderr_backtrace filter_xml
+ filter_stderr filter_stderr_backtrace filter_xml \
+ filter_varinfo3
EXTRA_DIST = $(noinst_SCRIPTS) \
addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
Modified: branches/DATASYMS/memcheck/tests/varinfo3.c
===================================================================
--- branches/DATASYMS/memcheck/tests/varinfo3.c 2008-02-26 19:37:27 UTC (rev 7484)
+++ branches/DATASYMS/memcheck/tests/varinfo3.c 2008-02-26 19:53:11 UTC (rev 7485)
@@ -1,23 +1,23 @@
/* Check for correct handling of static vs non-static, local vs
non-local variables in a zero-biased executable. */
-
/* Relevant compile flags are:
-Wall -g -I$prefix/include/valgrind
eg -Wall -g -I`pwd`/Inst/include/valgrind
*/
-
+/* Unfortunately 2008 Feb 26, requires its own filter_varinfo3, since
+ nonstatic_local_{un}def are not handled properly and so end up with
+ compiler-dependent names, eg static_local_def.2919 and
+ static_local_undef.2921. So filter off the .nnnn part. */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "memcheck/memcheck.h"
-
/* Cause memcheck to complain about the address "a" and so to print
its best guess as to what "a" actually is. a must be
addressible. */
-
void croak ( void* aV )
{
char* a = (char*)aV;
Modified: branches/DATASYMS/memcheck/tests/varinfo3.stderr.exp
===================================================================
--- branches/DATASYMS/memcheck/tests/varinfo3.stderr.exp 2008-02-26 19:37:27 UTC (rev 7484)
+++ branches/DATASYMS/memcheck/tests/varinfo3.stderr.exp 2008-02-26 19:53:11 UTC (rev 7485)
@@ -32,7 +32,7 @@
by 0x........: bar (varinfo3.c:42)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 5 bytes inside data symbol "static_local_def.2919"
+ Address 0x........ is 5 bytes inside data symbol "static_local_def.XXXX"
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
@@ -47,7 +47,7 @@
by 0x........: bar (varinfo3.c:44)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 7 bytes inside data symbol "static_local_undef.2921"
+ Address 0x........ is 7 bytes inside data symbol "static_local_undef.XXXX"
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
Modified: branches/DATASYMS/memcheck/tests/varinfo3.vgtest
===================================================================
--- branches/DATASYMS/memcheck/tests/varinfo3.vgtest 2008-02-26 19:37:27 UTC (rev 7484)
+++ branches/DATASYMS/memcheck/tests/varinfo3.vgtest 2008-02-26 19:53:11 UTC (rev 7485)
@@ -1 +1,2 @@
prog: varinfo3
+stderr_filter: filter_varinfo3
|