RFR(S): 8186286: [BSD] Primary thread's stack size is reported incorrectly

Thomas Stüfe thomas.stuefe at gmail.com
Thu Aug 17 13:06:03 UTC 2017


Hi Gunter,


On Thu, Aug 17, 2017 at 2:24 PM, Haug, Gunter <gunter.haug at sap.com> wrote:

> Hi,
>
> can I please have reviews and a sponsor fort the following small bug fix:
> http://cr.openjdk.java.net/~ghaug/webrevs/8186286/
> https://bugs.openjdk.java.net/browse/JDK-8186286
>
> At least on Mac OS 10.12 we have observed stack sizes of the primary
> thread not aligned to pages boundries. This can be provoked by e.g.
> setrlimit() (ulimit -s xxxx in the shell).This voids the computation of the
> addresses of the guard pages.
>
> Fix:
> Apparently Mac OS actually rounds upwards to next multiple of page size
> however, it is conservative to round downwards here to be on the safe side.
>
> Thanks and best regards,
> Gunter
>

Thanks for the patch!

Very minor nits: what Alexey wrote (we also have "is_aligned"). Plus, any
reason not to use os::vm_page_size()? Initialization dependencies?

Kind Regards, Thomas


More information about the hotspot-dev mailing list