* PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32
@ 2014-11-12 2:03 H.J. Lu
2014-11-12 10:06 ` Yury Gribov
0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2014-11-12 2:03 UTC (permalink / raw)
To: gcc-patches
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)" } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32
2014-11-12 2:03 PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32 H.J. Lu
@ 2014-11-12 10:06 ` Yury Gribov
2014-11-12 10:40 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Yury Gribov @ 2014-11-12 10:06 UTC (permalink / raw)
To: H.J. Lu, gcc-patches, Jakub Jelinek
On 11/12/2014 04:52 AM, H.J. Lu wrote:
> 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)" } */
>
Cc Jakub.
The patch looks sane but I wonder whether we should drop the test
completely now that we don't inline instrument builtins anymore.
-Y
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32
2014-11-12 10:06 ` Yury Gribov
@ 2014-11-12 10:40 ` Jakub Jelinek
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2014-11-12 10:40 UTC (permalink / raw)
To: Yury Gribov; +Cc: H.J. Lu, gcc-patches
On Wed, Nov 12, 2014 at 01:05:15PM +0300, Yury Gribov wrote:
> On 11/12/2014 04:52 AM, H.J. Lu wrote:
> >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)" } */
> >
>
> Cc Jakub.
>
> The patch looks sane but I wonder whether we should drop the test completely
> now that we don't inline instrument builtins anymore.
When it is already written, I'd keep it.
H.J., your patch is ok for trunk.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-12 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 2:03 PATCH: PR testsuite/63830: c-c++-common/asan/strlen-overflow-1.c fails on x32 H.J. Lu
2014-11-12 10:06 ` Yury Gribov
2014-11-12 10:40 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).