Patch: FYI: fix mmap bug in natFileChannelImplPosix.cc
Andrew Haley
aph@redhat.com
Tue Apr 3 09:34:00 GMT 2007
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
More information about the Java-patches
mailing list