[aarch64-port-dev ] RFR: 8234794: AArch64: runtime/memory/ReadFromNoaccessArea.java crashes

Andrew Haley aph at redhat.com
Wed Dec 11 20:16:18 UTC 2019


On 12/11/19 7:08 AM, Nick Gasson wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8234794
> Webrev: http://cr.openjdk.java.net/~ngasson/8234794/webrev.01/

Thanks. A few nits:

This recalculates klass_decode_mode() a thousand times on only a small
program. Be aware that C2 creates a new Assembler instance for most patterns.

_klass_decode_mode could be calculated only once. Make it static and it
will be.

This inverted logic:

#if !(defined(AARCH64) || defined(AIX))
  return ReservedSpace(size, alignment, large_pages, requested_addr);
#else // AARCH64 || AIX

looks a bit cumbersome. It might be nice to do it the other way up, so
that reserve_preferred_space is called from a static generic allocate
method.

Rather than explicitly defined(AARCH64) || defined(AIX) you might like to
consider a named macro

#if OS_CPU_USES_PREFERRED_SPACE
  return reserve_preferred_space( ...
endif

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-runtime-dev mailing list