[PATCH, libgfortran] Remove generate_error from mem_alloc_w_at and clean up
Jerry DeLisle
jvdelisle@verizon.net
Fri Oct 7 07:55:00 GMT 2005
:ADDPATCH fortran:
The attached patch moves the generate_error call into write_block to clear the
way for thread safe patch. The patch also adds checks for NULL returns from
write_block calls where these were missing to avoid possible memory writes to
NULL pointer.
Regression tested on i686-pc-linux-gnu. OK for mainline in front of Jacub's
patch? Or Jacub incorporate this?
Regards Jerry
2005-10-07 Jerry DeLisle <jvdelisle@verizon.net>
* io/transfer.c (write_block): Add test for end-of-file condition,
removed from mem_alloc_w_at.
* io/trasnfer.c (unformatted_write): Add return on NULL from
write_block call.
* io/transfer.c (next_record_w): Clean up checks for NULL pointer
returns from s_alloc_w.
* io/unix.c (mem_alloc_w_at): Remove call to generate_error end-of-file.
* io/write.c (write_float): Add checks for NULL pointer returns from
write_block calls.
* io/write.c (write_integer): Add checks for NULL pointer returns from
write_block calls.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ioreturns.diff
Type: text/x-patch
Size: 3930 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051007/126805e9/attachment.bin>
More information about the Fortran
mailing list