This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25835] Segfault or Bad Address error on unformatted sequential READ
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2006 14:44:08 -0000
- Subject: [Bug libfortran/25835] Segfault or Bad Address error on unformatted sequential READ
- References: <bug-25835-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from dir at lanl dot gov 2006-01-23 14:44 -------
Adding a buffer flush to "fd_alloc_r_at" seems to helped a lot - it now passes
the 65000 tests of 8 at a time and the 1048576 10 at a time tests with a small
buffer, but fails some where in the 262144 tests of 9 at a time with a large
buffer. How about your tests ?
static char *
fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
{
gfc_offset m;
if (where == -1)
where = s->logical_offset;
if (s->ndirty != 0 && fd_flush(s) == FAILURE)
return NULL;
if (s->buffer != NULL && s->buffer_offset <= where &&
where + *len <= s->buffer_offset + s->active)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25835