EFBIG (File too large)

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Feb 25 18:43:30 UTC 2008


On Mon, Feb 25, 2008 at 11:27:25AM -0500, Lennart Sorensen wrote:
> Backwards compatibility.  Some programs may have stupidly thought they
> could use an integer to keep track of things and if you suddenly change
> from 32 to 64 bits then you can have the program crash.
> 
> > I'm not going to "fix" JOVE.  Why add cruft like that.
> 
> Because that's how things work when you don't want to break an existing
> API.  This isn't Windows after all.

In addition to this the code in jove is severely broken.

For example:

void
f_seek(fp, offset)
register File   *fp;
off_t   offset;
{
        if (fp->f_flags & (F_WRITE|F_APPEND))
                flushout(fp);
        fp->f_cnt = 0;          /* next read will f_filbuf(), next write
                                   will flush() with no bad effects */
        lseek(fp->f_fd, (long) offset, L_SET);
}

The cast to a long in the lseek line is crap.  On 32bit x86 for example
long is 32bit, so the jove code just made 64bit file pointers imposible.

Of course on a 64bit x86 long is 64bit so the code would actually work
with large files as is on 64bit systems.  It does appear to contain tons
of legacy code for dos and windows and who knows what, so no wonder the
code has bugs.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list