[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 Thomas Koenig changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Thomas Koenig --- Fixed, closing.
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 --- Comment #8 from Thomas Koenig --- Author: tkoenig Date: Sat Oct 6 11:45:05 2018 New Revision: 264898 URL: https://gcc.gnu.org/viewcvs?rev=264898&root=gcc&view=rev Log: 2018-10-06 Thomas Koenig PR fortran/84640 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex by one. Set extents one past the array boundaries to zero to avoid warning with instrumented compiler. (gfc_simplify_eoshift): Likewise, only for ss_ex. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/simplify.c
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 --- Comment #7 from David Binderman --- Command line required: $ gfortran -c ./gfortran.dg/array_simplify_1.f90 ./gfortran.dg/eoshift.f90 ./gfortran.dg/simplify_cshift_1.f90 ./gfortran.dg/simplify_eoshift_1.f90
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 --- Comment #6 from David Binderman --- Still going wrong in the fortran testsuite: ../../trunk/gcc/fortran/simplify.c:2174:9: runtime error: pointer index expression with base 0x09d7eda8 overflowed to 0xfffc0314c058a5e8 ../../trunk/gcc/fortran/simplify.c:2174:9: runtime error: pointer index expression with base 0x0ae36b98 overflowed to 0xfffc06f8408423d8 ../../trunk/gcc/fortran/simplify.c:2175:9: runtime error: pointer index expression with base 0x09d7ed78 overflowed to 0xfffc0314c058a5b8 ../../trunk/gcc/fortran/simplify.c:2175:9: runtime error: pointer index expression with base 0x0ae36b78 overflowed to 0xfffc06f8408423b8 ../../trunk/gcc/fortran/simplify.c:2624:9: runtime error: pointer index expression with base 0x09d23a50 overflowed to 0xfffc039bf6aaf290 ../../trunk/gcc/fortran/simplify.c:2624:9: runtime error: pointer index expression with base 0x0b1ca9a0 overflowed to 0xfffc011e40e961e0 ../../trunk/gcc/fortran/simplify.c:2625:9: runtime error: pointer index expression with base 0x09d24270 overflowed to 0xfffc039bf6aafab0 ../../trunk/gcc/fortran/simplify.c:2625:9: runtime error: pointer index expression with base 0x0b1d0fd0 overflowed to 0xfffc011e40e9c810
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 --- Comment #5 from Martin Liška --- Any progress about this?
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 David Binderman changed: What|Removed |Added CC||dcb314 at hotmail dot com --- Comment #4 from David Binderman --- I am seeing something similar when compiling the fortran test suite: ./../trunk/gcc/fortran/simplify.c:2174:9: runtime error: pointer index expression with base 0x0b26c478 overflowed to 0xfffc05abee0f7cb8 Source code file gfortran.dg/array_simplify_1.f90 seems to demonstrate the problem.
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 Thomas Koenig changed: What|Removed |Added Status|NEW |ASSIGNED CC||tkoenig at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org Target Milestone|--- |9.0 Severity|normal |enhancement --- Comment #3 from Thomas Koenig --- (In reply to Martin Liška from comment #2) > So rptr points to an invalid memory. Question is whether a store/load from > the address can happen? No; rptr never stores to anywhere afterwards. However, I concur that it would be a good idea to clean up the logic for this part so that invalid pointers are never even generated. Something to look at for gcc 9.
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 Martin Liška changed: What|Removed |Added Status|WAITING |NEW --- Comment #2 from Martin Liška --- Can be easily seen with: diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index a970e017c90..66d9450d457 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -2171,7 +2171,9 @@ gfc_simplify_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim) while (count[n] == extent[n]) { count[n] = 0; + fprintf (stderr, "p: %p, ss_ex[n]: %ld\n", rptr, ss_ex[n]); rptr -= ss_ex[n]; + fprintf (stderr, "p2: %p\n", rptr); sptr -= ss_ex[n]; if (shiftvec) hptr -= hs_ex[n]; Then: $ ./gcc/xgcc -Bgcc /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/simplify_cshift_1.f90 -c -O p: 0x7824c48, ss_ex[n]: 433791696997 p2: 0xfcd807824920 p: 0x40780db40, ss_ex[n]: 433791696997 p2: 0x3fcd80780d818 p: 0x4078170e0, ss_ex[n]: 433791696997 p2: 0x3fcd807816db8 p: 0x407818be0, ss_ex[n]: 12 p2: 0x407818b80 p: 0x80781f5d0, ss_ex[n]: 126035584 p2: 0x7cb68c1d0 p: 0x10078216b0, ss_ex[n]: -1008 p2: 0x1007823630 p: 0x784b9a8, ss_ex[n]: 8589921888 p2: 0xfff0078646a8 So rptr points to an invalid memory. Question is whether a store/load from the address can happen?
[Bug fortran/84640] gcc/fortran/simplify.c:2587:9: runtime error: pointer index expression with base 0x0000090de160 overflowed to 0xffffffffc0632960
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84640 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2018-03-02 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- I cannot reproduce that. Could you please describe the problem with more details?