This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Nov 2014 17:52:55 -0800
- Subject: PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch updates c-c++-common/asan/strlen-overflow-1.c to avoid tail
call on x32. Tested on Linux/x86-64/ia32/x32. OK to install?
Thanks.
H.J.
---
2014-11-11 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/63830
* c-c++-common/asan/strlen-overflow-1.c (main): Avoid tail call.
diff --git a/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c b/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c
index 0f49286..33696ed 100644
--- a/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c
+++ b/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c
@@ -16,7 +16,7 @@ int main () {
char *p = &a[0];
asm ("" : "+r"(p));
__asan_poison_memory_region ((char *)&a[1], 1);
- return __builtin_strlen (a);
+ return __builtin_strlen (a) + 1;
}
/* { dg-output "READ of size 2 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */