This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-980205 : bug in insn-extract.c on sparc-sun-solaris2.5.1 ?



Hi,

i checked cc1plus with purify and it found an "Array bounds read" in
insn-extract.c, line 51 :

    case 394:
      for (i = XVECLEN (pat, 0); i >= 0; i--)
          ro[i] = XVECEXP (pat, 0, i);

I don't know anything about gcc internals but if you trust variable
names, this should be

      for (i = XVECLEN (pat, 0)-1; i >= 0; i--)
          ro[i] = XVECEXP (pat, 0, i);

The file insn-extract.c is machine generated, so i don't know where to
patch, but it should be easy to find for someone else.

Purify also found a lot of memory leaks.  Before reporting them, i
would like to know whether someone with a better knowledge of gcc
internals regularly checks it.

-- 
Laurent.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]