> r244027 reverts r244011. Sorry for the breakage. It seems to affect
> all i686 as well in addition to power, maybe all 32-bit hosts.
For the record, I see the following failures with an instrumented r244026 (as
in pr78672)
FAIL: gfortran.dg/char_length_20.f90 -O* execution test
FAIL: gfortran.dg/char_length_21.f90 -O* execution test
FAIL: gfortran.dg/repeat_2.f90 -O1 execution test
…
FAIL: gfortran.dg/repeat_2.f90 -Os execution test
FAIL: gfortran.dg/widechar_6.f90 -O1 execution test
…
FAIL: gfortran.dg/widechar_6.f90 -Os execution test
FAIL: gfortran.dg/widechar_intrinsics_6.f90 -O* execution test
The run time failures are all of the kind
=================================================================
==43614==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x602000000168 at pc 0x00010abfb578 bp 0x7fff55735250 sp 0x7fff55735248
READ of size 8 at 0x602000000168 thread T0
#0 0x10abfb577 in _gfortran_string_len_trim
(/opt/gcc/gcc7gp/lib/libgfortran.4.dylib+0x728577)
#1 0x10a4cae2c in MAIN__
(/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100000e2c)
#2 0x10a4caea6 in main
(/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100000ea6)
#3 0x7fffbd674254 in start (/usr/lib/system/libdyld.dylib+0x5254)
0x602000000168 is located 8 bytes to the left of 1-byte region
[0x602000000170,0x602000000171)
allocated by thread T0 here:
#0 0x10c043319 in wrap_malloc (/opt/gcc/gcc7a/lib/libasan.4.dylib+0x61319)
#1 0x10a4cad11 in MAIN__
(/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100000d11)
#2 0x10a4caea6 in main
(/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100000ea6)
#3 0x7fffbd674254 in start (/usr/lib/system/libdyld.dylib+0x5254)
SUMMARY: AddressSanitizer: heap-buffer-overflow
(/opt/gcc/gcc7gp/lib/libgfortran.4.dylib+0x728577) in _gfortran_string_len_trim
Shadow bytes around the buggy address:
0x1c03ffffffd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1c03ffffffe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1c03fffffff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1c0400000000: fa fa fd fd fa fa fd fd fa fa 00 07 fa fa 00 06
0x1c0400000010: fa fa 03 fa fa fa 00 00 fa fa 00 06 fa fa 06 fa
=>0x1c0400000020: fa fa 07 fa fa fa 07 fa fa fa fd fa fa[fa]01 fa
0x1c0400000030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400000040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400000050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400000060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400000070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==43614==ABORTING
Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x10a4d8558
#1 0x10a4d65f5
#2 0x7fffbd881bb9
Abort
Dominique