#38 array bound reads

Stable
closed-fixed
Other (25)
5
2003-04-27
2003-01-28
No

Some ATLAS subroutines cause ABR (array bound read)
messages in Purify. They are typically caused by
statements such as the following:

while(*X == ATL_rzero && X != stX0) X++;

Note that you test for a zero value before testing
for the end-of-array condition. This code will
read one element past the end of array X.

The problem can be avoided by swapping the tests:

while(X != stX0 && *X == ATL_rzero) X++;

I saw this problem in the following locations:

src/blas/reference/level1/ATL_drefnrm2.c, line 107
src/blas/reference/level1/ATL_dzrefnrm2.c, line 104
src/blas/reference/level1/ATL_screfnrm2.c, line 104
src/blas/reference/level1/ATL_srefnrm2.c, line 107
tune/blas/level1/NRM2/cnrm2_ssq1_x0.c, line 12
tune/blas/level1/NRM2/nrm2_ssq1_x0.c, line 11
tune/blas/level1/NRM2/nrm2_ssqr4_x1.c, line 91

However, there might be other locations as well.

Discussion

  • R. Clint Whaley

    R. Clint Whaley - 2003-01-29

    Logged In: YES
    user_id=182470

    Thank you very much for pointing out the errors. The
    refblas should never be used in ATLAS, but the routs in tune
    certainly could. I will fix in basefiles and post an errata
    probably this weekend.

    Thanks,
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2003-01-29
    • labels: 360155 -->
    • milestone: 148062 -->
     
  • R. Clint Whaley

    R. Clint Whaley - 2003-02-05
    • labels: --> Other
    • milestone: --> Stable
    • assigned_to: nobody --> rwhaley
    • status: open --> open-accepted
     
  • R. Clint Whaley

    R. Clint Whaley - 2003-02-05

    Logged In: YES
    user_id=182470

    I've posted the errata at:
    http://math-atlas.sourceforge.net/errata.html#NRM2
    Still need to make changes to basefiles (both 3.4 & 3.5),
    and post a new developer release before closing bug report.

     
  • R. Clint Whaley

    R. Clint Whaley - 2003-02-06

    Logged In: YES
    user_id=182470

    Bugs are fixed in both 3.4 and 3.5 basefiles. Can close
    this bug report as soon as next developer release.

     
  • R. Clint Whaley

    R. Clint Whaley - 2003-02-06
    • status: open-accepted --> open-fixed
     
  • R. Clint Whaley

    R. Clint Whaley - 2003-04-27
    • status: open-fixed --> closed-fixed
     
  • R. Clint Whaley

    R. Clint Whaley - 2003-04-27

    Logged In: YES
    user_id=182470

    fixed in 3.5.1

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks