This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, mudflap]: Adjust fail{8,9}-frag.c scan pattern for mudflap dead object
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Fri, 22 Feb 2008 20:11:56 +0100
- Subject: [PATCH, mudflap]: Adjust fail{8,9}-frag.c scan pattern for mudflap dead object
Hello!
Usually, there are a couple of mudflap object allocated around, so these
tests detect 2 objects:
Nearby object 1: checked region begins 2487B after and ends 2496B after
mudflap object 0x605b40: name=`malloc region'
and
Nearby object 2: checked region begins 0B into and ends 9B into
mudflap dead object 0x6064d0: name=`malloc region'
It is a bit pointless to detect "object 1" that is 2k away from our test
object. It is object2 that we are looking for, and from these two tests
it is evident, that this is freed (AKA "dead") object.
On my 64bit FC6, object 1 is farther away, so only "dead" object is
detected. Due to this fact, attached patch adjusts dg-output pattern to
look for dead object that is always present.
The patch was regression tested on x86_64 {,-m32} and clears spurious
failure in 64bit case.
2008-02-21 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libmudflap.c/fail8-frag.c: Adjust scan pattern for
mudflap dead object.
* testsuite/libmudflap.c/fail9-frag.c: Ditto.
If there are no objections, the patch will be committed in next 12h to
mainline as obvious.
Uros.
Index: testsuite/libmudflap.c/fail9-frag.c
===================================================================
--- testsuite/libmudflap.c/fail9-frag.c (revision 132554)
+++ testsuite/libmudflap.c/fail9-frag.c (working copy)
@@ -17,5 +17,5 @@
/* { dg-output "mudflap violation 1.*memcpy dest.*" } */
/* { dg-output "Nearby object.*" } */
-/* { dg-output "mudflap object.*malloc region.*alloc time.*dealloc
time.*" } */
+/* { dg-output "mudflap dead object.*malloc region.*alloc time.*dealloc
time.*" } */
/* { dg-do run { xfail *-*-* } } */
Index: testsuite/libmudflap.c/fail8-frag.c
===================================================================
--- testsuite/libmudflap.c/fail8-frag.c (revision 132554)
+++ testsuite/libmudflap.c/fail8-frag.c (working copy)
@@ -15,5 +15,5 @@
}
/* { dg-output "mudflap violation 1.*memcpy source.*" } */
/* { dg-output "Nearby object.*" } */
-/* { dg-output "mudflap object.*malloc region.*alloc time.*dealloc
time.*" } */
+/* { dg-output "mudflap dead object.*malloc region.*alloc time.*dealloc
time.*" } */
/* { dg-do run { xfail *-*-* } } */