https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122491

            Bug ID: 122491
           Summary: [16 Regression] asan instrumented gcc:
                    heap-use-after-free in fortran/parse.cc:1861 while
                    running gfortran.dg/pr103508.f90
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: needs-bisection
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pheeck at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Running gcc/testsuite/gfortran.dg/pr103508.f90 with
adress-sanitizer-intrumented GCC results in

==3367914==ERROR: AddressSanitizer: heap-use-after-free on address
0x7dbe75e14490 at pc 0x000000c49fa6 bp 0x7ffefabb3bf0 sp 0x7ffefabb3be8
READ of size 8 at 0x7dbe75e14490 thread T0
    #0 0x000000c49fa5 in next_statement
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:1861
    #1 0x000000c51731 in parse_executable
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:6819
    #2 0x000000c55ec9 in parse_progunit
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:7092
    #3 0x000000c51fad in parse_block_construct
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:5276
    #4 0x000000c51fad in parse_executable
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:6700
    #5 0x000000c55ec9 in parse_progunit
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:7092
    #6 0x000000c57f17 in gfc_parse_file()
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/parse.cc:7618
    #7 0x000000d78cb4 in gfc_be_parse_file
/home/worker/buildworker/tiber-gcc-asan/build/gcc/fortran/f95-lang.cc:247
    #8 0x000002489be8 in compile_file
/home/worker/buildworker/tiber-gcc-asan/build/gcc/toplev.cc:453

This has started with the introduction of the test itself in
r16-4016-g5e6937b9ab4f75.


GCC configured with:
--enable-languages=default,jit,lto,go,d --enable-host-shared
--enable-checking=release --disable-multilib --with-build-config=bootstrap-asan

Reply via email to