RFR: 8049536: os::commit_memory on Solaris uses aligment_hint as page size
Thomas Schatzl
thomas.schatzl at oracle.com
Mon Sep 15 08:06:32 UTC 2014
Hi,
On Fri, 2014-09-12 at 15:08 +0200, Erik Helin wrote:
> All,
>
> quick feedback from StefanK:
> - forgot to cast vm_page_size() to size_t in one place
> - print caddr_t with PRT_FORMAT in error message
>
> Webrevs:
> - full: http://cr.openjdk.java.net/~ehelin/8049536/webrev.03/
> - incremental: http://cr.openjdk.java.net/~ehelin/8049536/webrev.02-03/
os_solaris.cpp, line 3093:
assert(is_size_aligned((size_t) start, align), ...
I think it is invalid to cast an address to a size_t. At least the C99
standard does not ensure that this is a valid cast.
(In practice it is the case for all by Oracle supported platforms I
think)
The change should use is_ptr_aligned() here and in line 3096 I think,
and fix the err_msg() format parameters.
> On 2014-09-12 14:52, Erik Helin wrote:
> > Hi,
> >
> > I've uploaded a new patch that also contains a test:
> > - full: http://cr.openjdk.java.net/~ehelin/8049536/webrev.02/
> > - incremental: http://cr.openjdk.java.net/~ehelin/8049536/webrev.01-02/
> >
> > The test only provokes the bug together with the patch for JDK-8027915
> > and without this patch. Since we don't want to break nightly testing, it
> > is better to push this patch first and then push the patch for
> > JDK-8027915 (even though the test isn't that meaningful in this patch).
Thanks for the test case.
Thanks,
Thomas
More information about the hotspot-runtime-dev
mailing list