[6 Regession] Usage of unitialized pointer io/list_read.c (
Christophe Lyon
christophe.lyon@linaro.org
Tue Feb 16 08:06:00 GMT 2016
On 15 February 2016 at 23:16, Janne Blomqvist <blomqvist.janne@gmail.com> wrote:
> On Mon, Feb 15, 2016 at 11:45 PM, Jerry DeLisle <jvdelisle@charter.net> wrote:
>> The title of the PR should be "Mishandling of namelist comments" or
>> "Interpreting '!' as a comment in non-namelist reads".
>>
>> The attached patch fixes the regression by reverting the previous attempt at
>> namelist comments that used only CASE_SEPARATOR to enable comments in namelists.
>> The approach now is to test specifically for '!' in each type of read various
>> functions. If in namelist mode the respective case falls through to the handling
>> of separators which eats the line when a '!' is found. Otherwise, the read is
>> determined to be bad and an error is issued.
>>
>> Since the reporter of this PR noticed something screwy with the 'new' pointer in
>> push_char4, I took a close look at the code and deleted it. I also heavily
>> instrumented and tested this mechanism to grow the buffer and deleted the use of
>> memset which was commented to not be needed. The 'new' was not being initialized
>> and I think was a leftover from a previous edit and just missed.
>>
>> I added two new test cases in the patch. These test all the new error
>> conditions. Also, read_bang4.f90 uses a large kind=4 string to exercise the
>> buffer mechanism. Verification is through making sure what we read in matches
>> what we wrote out to the test scratch file
>>
>> Regression tested on x86_64-Linux. OK for trunk? any thoughts on back porting
>> to 5 since it fixes a potentially bad pointer problem in push_char4?
>
> Ok for both trunk and 5.
>
>
Hi,
Although OK in trunk, I've noticed regressions in the gcc-5 branch
since you commtted
r233442:
- PASS now FAIL [PASS => FAIL]:
gfortran.dg/namelist_38.f90 -O0 execution test
gfortran.dg/namelist_38.f90 -O1 execution test
gfortran.dg/namelist_38.f90 -O2 execution test
gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer execution test
gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions execution test
gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer
-funroll-loops execution test
gfortran.dg/namelist_38.f90 -O3 -g execution test
gfortran.dg/namelist_38.f90 -Os execution test
gfortran.dg/namelist_84.f90 -O0 execution test
gfortran.dg/namelist_84.f90 -O1 execution test
gfortran.dg/namelist_84.f90 -O2 execution test
gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer execution test
gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions execution test
gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer
-funroll-loops execution test
gfortran.dg/namelist_84.f90 -O3 -g execution test
gfortran.dg/namelist_84.f90 -Os execution test
Looking at the logs, I can see:
At line 33 of file
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/gfortran.dg/namelist_38.f90
(unit = 10, file = '/gfortrantmpzLPCW0')
Fortran runtime error: Cannot match namelist object name a'a
FAIL: gfortran.dg/namelist_38.f90 -O0 execution test
At line 20 of file
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/gfortran.dg/namelist_84.f90
(unit = 10, file = '/gfortrantmpVWEbdK')
Fortran runtime error: Cannot match namelist object name mon
FAIL: gfortran.dg/namelist_84.f90 -O0 execution test
I'm running the tests on arm* and aarch64* targets.
Am I missing something?
Thanks,
Christophe.
> --
> Janne Blomqvist
More information about the Fortran
mailing list