This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: FYI: fix mmap bug in natFileChannelImplPosix.cc
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2007 10:34:40 +0100
- Subject: Re: Patch: FYI: fix mmap bug in natFileChannelImplPosix.cc
- References: <m3ircexowc.fsf@localhost.localdomain>
Tom Tromey writes:
> I'm checking this in on the trunk and the RH 4.1 branch.
>
> This fixes a bug in how we mmap() files for use in MappedByteBufferImpl.
> The bug is that if we are mapping for write, and the file is shorter
> than the requested length, then we must make the file the desired
> length, or else the mapped segment won't be long enough.
>
> This fixes a bug found by the Animal Shelter Manager program (actually
> by the underlying database it uses, I think).
Ah, thank you. This also fixes a bug I found in hsqldb startup.
For what it's worth, I'm not convinced that the spec really requires
such a change, but some apps do.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903