Commit b9700367 by H.J. Lu Committed by H.J. Lu

Avoid tail call in c-c++-common/asan/strlen-overflow-1.c

	PR testsuite/63830
	* c-c++-common/asan/strlen-overflow-1.c (main): Avoid tail call.

From-SVN: r217417
parent 47b25362
2014-11-12 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/63830
* c-c++-common/asan/strlen-overflow-1.c (main): Avoid tail call.
2014-11-12 Jakub Jelinek <jakub@redhat.com> 2014-11-12 Jakub Jelinek <jakub@redhat.com>
PR c/59708 PR c/59708
......
...@@ -16,7 +16,7 @@ int main () { ...@@ -16,7 +16,7 @@ int main () {
char *p = &a[0]; char *p = &a[0];
asm ("" : "+r"(p)); asm ("" : "+r"(p));
__asan_poison_memory_region ((char *)&a[1], 1); __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)" } */ /* { dg-output "READ of size 2 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment