This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR55475 - fix invalid reads with show_locus


I have now committed that patch as obvious, Rev. 194076.

http://gcc.gnu.org/ml/fortran/2012-11/msg00084.html

Tobias

Tobias Burnus wrote:
As found with -fsanitize=address by HJ, but it also shows up with valgrind. The fix for the PR is the change in scanner.c; I think the patch is rather obvious.

The change in error.c is due to:

  if (c1 == c2)
    c2 += 1;

which could lead to an out-of-bounds condition is "c1" is already at the last character - then one exceeds the bound for c2.

Build and tested on x86-64-linux with no new failures.*
OK for the trunk?

Tobias

* I get: FAIL for gfortran.dg/lto/pr45586, gfortran.dg/realloc_on_assign_5.f03 and gfortran.dg/reassoc_4.f and XPASS for gfortran.dg/do_1.f90.


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