* [PATCH] i386: Fix array index overflow in pr105354-2.c
@ 2024-04-26 9:01 Haochen Jiang
2024-04-26 9:13 ` Uros Bizjak
0 siblings, 1 reply; 3+ messages in thread
From: Haochen Jiang @ 2024-04-26 9:01 UTC (permalink / raw)
To: gcc-patches; +Cc: hongtao.liu, ubizjak
Hi all,
The array index should not be over 8 for v8hi, or it will fail
under -O0 or using -fstack-protector.
This patch aims to fix that, which is mentioned in PR110621.
Commit as obvious and backport to GCC13.
Thx,
Haochen
gcc/testsuite/ChangeLog:
PR target/110621
* gcc.target/i386/pr105354-2.c: As mentioned.
---
gcc/testsuite/gcc.target/i386/pr105354-2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/pr105354-2.c b/gcc/testsuite/gcc.target/i386/pr105354-2.c
index b78b62e1e7e..1c592e84860 100644
--- a/gcc/testsuite/gcc.target/i386/pr105354-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr105354-2.c
@@ -17,7 +17,7 @@ sse2_test (void)
b.a[i] = i + 16;
res_ab.a[i] = 0;
exp_ab.a[i] = -1;
- if (i <= 8)
+ if (i < 8)
{
c.a[i] = i;
d.a[i] = i + 8;
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i386: Fix array index overflow in pr105354-2.c
2024-04-26 9:01 [PATCH] i386: Fix array index overflow in pr105354-2.c Haochen Jiang
@ 2024-04-26 9:13 ` Uros Bizjak
2024-04-26 16:16 ` Jiang, Haochen
0 siblings, 1 reply; 3+ messages in thread
From: Uros Bizjak @ 2024-04-26 9:13 UTC (permalink / raw)
To: Haochen Jiang; +Cc: gcc-patches, hongtao.liu
On Fri, Apr 26, 2024 at 11:03 AM Haochen Jiang <haochen.jiang@intel.com> wrote:
>
> Hi all,
>
> The array index should not be over 8 for v8hi, or it will fail
> under -O0 or using -fstack-protector.
>
> This patch aims to fix that, which is mentioned in PR110621.
>
> Commit as obvious and backport to GCC13.
>
> Thx,
> Haochen
>
> gcc/testsuite/ChangeLog:
>
> PR target/110621
> * gcc.target/i386/pr105354-2.c: As mentioned.
Please note that the ChangeLog entry gets copied into the relevant
ChangeLog file independently of the commit message. So, the above
entry will be copied to gcc/testsuite/ChangeLog without any reference
to what was mentioned.
Uros.
> ---
> gcc/testsuite/gcc.target/i386/pr105354-2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr105354-2.c b/gcc/testsuite/gcc.target/i386/pr105354-2.c
> index b78b62e1e7e..1c592e84860 100644
> --- a/gcc/testsuite/gcc.target/i386/pr105354-2.c
> +++ b/gcc/testsuite/gcc.target/i386/pr105354-2.c
> @@ -17,7 +17,7 @@ sse2_test (void)
> b.a[i] = i + 16;
> res_ab.a[i] = 0;
> exp_ab.a[i] = -1;
> - if (i <= 8)
> + if (i < 8)
> {
> c.a[i] = i;
> d.a[i] = i + 8;
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] i386: Fix array index overflow in pr105354-2.c
2024-04-26 9:13 ` Uros Bizjak
@ 2024-04-26 16:16 ` Jiang, Haochen
0 siblings, 0 replies; 3+ messages in thread
From: Jiang, Haochen @ 2024-04-26 16:16 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches, Liu, Hongtao
> -----Original Message-----
> From: Uros Bizjak <ubizjak@gmail.com>
> Sent: Friday, April 26, 2024 5:13 PM
> To: Jiang, Haochen <haochen.jiang@intel.com>
> Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao <hongtao.liu@intel.com>
> Subject: Re: [PATCH] i386: Fix array index overflow in pr105354-2.c
>
> On Fri, Apr 26, 2024 at 11:03 AM Haochen Jiang <haochen.jiang@intel.com>
> wrote:
> >
> > Hi all,
> >
> > The array index should not be over 8 for v8hi, or it will fail
> > under -O0 or using -fstack-protector.
> >
> > This patch aims to fix that, which is mentioned in PR110621.
> >
> > Commit as obvious and backport to GCC13.
> >
> > Thx,
> > Haochen
> >
> > gcc/testsuite/ChangeLog:
> >
> > PR target/110621
> > * gcc.target/i386/pr105354-2.c: As mentioned.
>
> Please note that the ChangeLog entry gets copied into the relevant
> ChangeLog file independently of the commit message. So, the above
> entry will be copied to gcc/testsuite/ChangeLog without any reference
> to what was mentioned.
>
I see. Forget to pay attention to that ChangeLog entry. My Bad.
Thx,
Haochen
> Uros.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-26 16:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 9:01 [PATCH] i386: Fix array index overflow in pr105354-2.c Haochen Jiang
2024-04-26 9:13 ` Uros Bizjak
2024-04-26 16:16 ` Jiang, Haochen
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).