This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] PR67367 Program crashes on READ
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: gfortran <fortran at gcc dot gnu dot org>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 29 Aug 2015 08:56:20 -0700
- Subject: Re: [patch, libgfortran] PR67367 Program crashes on READ
- Authentication-results: sourceware.org; auth=none
- References: <55E14093 dot 1070407 at charter dot net>
On 08/28/2015 10:18 PM, Jerry DeLisle wrote:
> I found that in read_buf where raw_read is called, no checks for errors were
> being made, raw_read returns the number of bytes read or an error code. In the
> test case, an error occurs and we proceeded to use the resulting error code as
> if it were the number of bytes read.
>
> The attached patch fixes this. Regression tested on x86_64. New test case
> provided.
>
> OK for trunk?
>
Committed. I should mention, the test case may fail on some platforms since the
system call may be dependent. I will xfail those as we learn which. Test case
committed revision 227321.
Regards,
Jerry