public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/40829]  New: gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv
@ 2009-07-22 21:27 simon_baldwin at yahoo dot com
  2009-07-27 12:08 ` [Bug testsuite/40829] " simon_baldwin at yahoo dot com
  2009-07-28 16:52 ` hjl at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: simon_baldwin at yahoo dot com @ 2009-07-22 21:27 UTC (permalink / raw)
  To: gcc-bugs

>From gcc.dg/vect/no-scevccp-noreassoc-outer-2.c:

  6 #define N 40
  7 int a[200*N];
  8
  9 __attribute__ ((noinline)) void
 10 foo (){
 11   int i,j;
 12   int sum,s=0;
 13
 14   for (i = 0; i < 200*N; i++) {
 15     sum = 0;
 16     for (j = 0; j < N; j++) {
 17       sum += (i + j);
 18       i++;
 19     }
 20     a[i] = sum;  // i exceeds 8000, runs off array end
 21   }
 22 }

In function foo(), at line 20, variable 'i' can exceed the bounds of array 'a',
and segv is possible.

The fix may be as simple as padding array 'a', provided this does not affect
the other things that this test validates.


-- 
           Summary: gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simon_baldwin at yahoo dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40829


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug testsuite/40829] gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv
  2009-07-22 21:27 [Bug testsuite/40829] New: gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv simon_baldwin at yahoo dot com
@ 2009-07-27 12:08 ` simon_baldwin at yahoo dot com
  2009-07-28 16:52 ` hjl at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: simon_baldwin at yahoo dot com @ 2009-07-27 12:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from simon_baldwin at yahoo dot com  2009-07-27 12:08 -------
Committed revision 150109.


-- 

simon_baldwin at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40829


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug testsuite/40829] gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv
  2009-07-22 21:27 [Bug testsuite/40829] New: gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv simon_baldwin at yahoo dot com
  2009-07-27 12:08 ` [Bug testsuite/40829] " simon_baldwin at yahoo dot com
@ 2009-07-28 16:52 ` hjl at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-07-28 16:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl at gcc dot gnu dot org  2009-07-28 16:51 -------
Subject: Bug 40829

Author: hjl
Date: Tue Jul 28 16:51:19 2009
New Revision: 150169

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150169
Log:
2009-07-28  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-07-27  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/40848
        * gfortran.dg/altreturn_7.f90: New.

        2009-07-27  Simon Baldwin  <simonb@google.com>

        PR testsuite/40829
        * gcc.dg/vect/no-scevccp-noreassoc-outer-2.c: Extended array 'a'
        so that indexing no longer runs off array end.

        2009-07-24  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/40822
        * gfortran.dg/char_length_16.f90: New.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/altreturn_7.f90
      - copied unchanged from r150168,
trunk/gcc/testsuite/gfortran.dg/altreturn_7.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/char_length_16.f90
      - copied unchanged from r150168,
trunk/gcc/testsuite/gfortran.dg/char_length_16.f90
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40829


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-28 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 21:27 [Bug testsuite/40829] New: gcc.dg/vect/no-scevccp-noreassoc-outer-2.c can segv simon_baldwin at yahoo dot com
2009-07-27 12:08 ` [Bug testsuite/40829] " simon_baldwin at yahoo dot com
2009-07-28 16:52 ` hjl at gcc dot gnu dot org

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).