classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: misc NIO fixes


From: Casey Marshall
Subject: Re: [cp-patches] RFC: misc NIO fixes
Date: Tue, 26 Jul 2005 21:07:13 -0700

On Jul 26, 2005, at 12:42 AM, Mark Wielaard wrote:

Hi,

On Sat, 2005-07-23 at 20:37 -0700, Casey Marshall wrote:

Committed. I changed a few minor things, such as using Mark's
suggestion to use 'madvise' to load the file into core.

I can't get this to work with Jamvm on Darwin; I get a bizarre
segfault when trying to create the new MappedByteBufferImpl, and
apparently 'mincore' does not work properly if the mapped region is
only one page in size. This appears to work fine on GNU/Linux,
however, so I'm putting it down to problems with Darwin.


I am seeing the following warnings (which break the build when
configured with --enable-Werror):

gnu_java_nio_channels_FileChannelImpl.c:565:
  warning: pointer of type 'void *' used in arithmetic
gnu_java_nio_channels_FileChannelImpl.c:504:
  warning: 'RawData_init' may be used uninitialized in this function
gnu_java_nio_channels_FileChannelImpl.c:503: warning:
'MappedByteBufferImpl_init' may be used uninitialized in this function

I have not investigated them yet. But maybe they give a hint to why
things don't work on darwin?


I doubt it; the segfault disappears if I put a printf printing the pointer 'MappedByteBufferImpl_init' before using it to create the new buffer. This random kind of behavior makes me guess that I'm corrupting memory somehow, but I can't figure out where.

I noticed the warnings, but didn't know we built with Werror; I'll fix these.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]