[patch, libgfortran] [7/8 Regression] Crash of runtime gfortran library during integer transformation

Jerry DeLisle jvdelisle@charter.net
Mon May 15 20:10:00 GMT 2017


Hi all,

Crash is a misnomer on this PR [aside: People see the backtrace and assume]

This patch fixes the problem by correctly detecting the EOR condition for 
internal units. The previous check in read_sf_internal was wrong, relying 
probably on uninitialized memory as can be seen by the still open PR78881. 
Removing the bad hunk fixes the regression here and the new code lets 
dtio_26.f90 pass as expected.

Regression tested on x86_64. New test case will be added.

OK for trunk? Will back port in a few days to 7.

I will also have Rainer verify it fixes the problem on sparc (78881)

Regards,

Jerry

2017-05-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/80727
	* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
	(read_block_form): For internal units, generate EOR if no more
	bytes left in unit and we are trying to read with ADVANCE='NO'.






-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr80727.diff
Type: text/x-patch
Size: 1188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170515/1fc41b55/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_3.f90
Type: text/x-fortran
Size: 384 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170515/1fc41b55/attachment-0001.bin>


More information about the Fortran mailing list