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

            Bug ID: 100071
           Summary: Test case libgomp.fortran/alloc-2.F90 fails with
                    invalid memory reference
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:fff15bad1ab571906c37b88380431768d917dcb0, r11-2101

The commit above is where this test case was introduced and it fails both there
and with current trunk.  The following runs were on a power 8 BE machine.  I
did not see failures on LE.

This is kind of odd.  If I run the test case like this the 64 bit run fails:

make  -k check-target-libgomp RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'
fortran.exp=libgomp.fortran/alloc-2.F90"
                === libgomp tests ===
Running target unix/-m32
                === libgomp Summary for unix/-m32 ===
# of expected passes            2
Running target unix/-m64
FAIL: libgomp.fortran/alloc-2.F90   -O  execution test
                === libgomp Summary for unix/-m64 ===
# of expected passes            1
# of unexpected failures        1
                === libgomp Summary ===
# of expected passes            3
# of unexpected failures        1

The error is:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x3fffb7f80477 in ???
#1  0x3fffb799af24 in __GI___libc_free
        at /usr/src/debug/glibc-2.17-c758a686/malloc/malloc.c:2941
#2  0x3fffb7b9940f in omp_free
        at /home/seurer/gcc/git/gcc-test2/libgomp/allocator.c:391
#3  0x100015bb in ???
#4  0x10001793 in ???
#5  0x3fffb7927ceb in generic_start_main
        at ../csu/libc-start.c:266
FAIL: libgomp.fortran/alloc-2.F90   -O  execution test


If I run just the 32 or the 64 bit ones individually they work:

make  -k check-target-libgomp RUNTESTFLAGS="--target_board=unix'{-m32}'
fortran.exp=libgomp.fortran/alloc-2.F90"
                === libgomp tests ===
Running target unix/-m32
                === libgomp Summary ===
# of expected passes            2

make  -k check-target-libgomp RUNTESTFLAGS="--target_board=unix'{-m64}'
fortran.exp=libgomp.fortran/alloc-2.F90"
                === libgomp tests ===
Running target unix/-m64
                === libgomp Summary ===
# of expected passes            2


If I run the 64 bit one before the 32 bit one they both work.  If I do the 64
bit one twice the second run fails.  If I do the 32 bit one twice they both
work.

So, it looks like something is not being cleaned up between the runs that
causes the second run to fail if it is a 64 bit run.

Reply via email to