Bug 55484 - gfortran.dg/realloc_on_assign_5.f03 execution failures with -fsanitize=address
Summary: gfortran.dg/realloc_on_assign_5.f03 execution failures with -fsanitize=address
Status: RESOLVED DUPLICATE of bug 47674
Alias: None
Product: gcc
Classification: Unclassified
Component: sanitizer (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-27 03:33 UTC by Jack Howarth
Modified: 2013-09-02 11:17 UTC (History)
4 users (show)

See Also:
Host: x86_64-apple-darwin12,x86_64-unknown-linux-gnu
Target: x86_64-apple-darwin12,x86_64-unknown-linux-gnu
Build: x86_64-apple-darwin12,x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
assembly file for gfortran.dg/realloc_on_assign_5.f03 -O0 with -fsanitize=address (2.47 KB, text/plain)
2012-11-27 03:40 UTC, Jack Howarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2012-11-27 03:33:04 UTC
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
Comment 1 Jack Howarth 2012-11-27 03:40:19 UTC
Created attachment 28788 [details]
assembly file for gfortran.dg/realloc_on_assign_5.f03  -O0 with -fsanitize=address
Comment 2 Jack Howarth 2012-12-10 18:20:47 UTC
Also seen on x86_64 Fedora 15.
Comment 3 Dominique d'Humieres 2013-09-02 11:17:56 UTC
Still present at revision 202154. I think it is a duplicate of PR47674.

*** This bug has been marked as a duplicate of bug 47674 ***