http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55484



             Bug #: 55484

           Summary: gfortran.dg/realloc_on_assign_5.f03 execution failures

                    with -fsanitize=address

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: sanitizer

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: howa...@nitro.med.uc.edu

                CC: do...@gcc.gnu.org, dvyu...@gcc.gnu.org,

                    ja...@gcc.gnu.org, k...@gcc.gnu.org





Using...



make -k check-gfortran RUNTESTFLAGS="--target_board=unix'{-fsanitize=address}'"



on x86_64-apple-darwin12 produces execution failures in...



FAIL: gfortran.dg/realloc_on_assign_5.f03  -O0  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O1  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O2  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O3 -fomit-frame-pointer  execution

test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O3 -fomit-frame-pointer

-funroll-loops  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O3 -fomit-frame-pointer

-funroll-all-loops -finline-functions  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O3 -g  execution test

FAIL: gfortran.dg/realloc_on_assign_5.f03  -Os  execution test



which are of the form...



Executing on host:

/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../gfortran

-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../

-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/

/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121124/gcc/testsuite/gfortran.dg/realloc_on_assign_5.f03

 -fno-diagnostics-show-caret   -O0   -pedantic-errors 

-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs

-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs

-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs

-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs

-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs

-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs

 -lm   -fsanitize=address -o ./realloc_on_assign_5.exe    (timeout = 300)

PASS: gfortran.dg/realloc_on_assign_5.f03  -O0  (test for excess errors)

Setting LD_LIBRARY_PATH to

.:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc:.:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc

=================================================================

==54787== ERROR: AddressSanitizer: heap-buffer-overflow on address

0x000110d8b0c1 at pc 0x10de5c987 bp 0x7fff6da593c0 sp 0x7fff6da593b8

READ of size 1 at 0x000110d8b0c1 thread T0

    #0 0x10de5c986

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x100001986)

    #1 0x10de5ccc1

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x100001cc1)

    #2 0x10de5c087

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x100001087)

    #3 0x0

0x000110d8b0c1 is located 0 bytes to the right of 1-byte region

[0x000110d8b0c0,0x000110d8b0c1)

allocated by thread T0 here:

    #0 0x10dfe9b7b (/sw/lib/gcc4.8/lib/libasan.0.dylib+0xbb7b)

    #1 0x7fff958d5242 (/usr/lib/system/libsystem_c.dylib+0xa0242)

    #2 0x7fff958d6031 (/usr/lib/system/libsystem_c.dylib+0xa1031)

    #3 0x10de5c8cd

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x1000018cd)

    #4 0x10de5ccc1

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x100001cc1)

    #5 0x10de5c087

(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./realloc_on_assign_5.exe+0x100001087)

Shadow byte and word:

  0x1000221b1618: 1

  0x1000221b1618: 01 fb fb fb fb fb fb fb

More shadow bytes:

  0x1000221b15f8: fd fd fd fd fd fd fd fd

  0x1000221b1600: fa fa fa fa fa fa fa fa

  0x1000221b1608: fd fd fd fd fd fd fd fd

  0x1000221b1610: fa fa fa fa fa fa fa fa

=>0x1000221b1618: 01 fb fb fb fb fb fb fb

  0x1000221b1620: fa fa fa fa fa fa fa fa

  0x1000221b1628: fa fa fa fa fa fa fa fa

  0x1000221b1630: fa fa fa fa fa fa fa fa

  0x1000221b1638: fa fa fa fa fa fa fa fa

Stats: 0M malloced (0M for red zones) by 5 calls

Stats: 0M realloced by 2 calls

Stats: 0M freed by 3 calls

Stats: 0M really freed by 0 calls

Stats: 1M (256 full pages) mmaped in 2 calls

  mmaps   by size class: 7:4095; 8:2047;

  mallocs by size class: 7:3; 8:2;

  frees   by size class: 7:2; 8:1;

  rfrees  by size class:

Stats: malloc large: 0 small slow: 2

==54787== ABORTING

FAIL: gfortran.dg/realloc_on_assign_5.f03  -O0  execution test

Reply via email to