RFR: JDK-8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Matthias Baesken mbaesken at openjdk.java.net
Tue Jan 19 15:42:58 UTC 2021


Currently we could run into an uninitialized value of expand_ms in G1CollectedHeap::expand_heap_after_young_collection() .
This would happen in case of an early return of bool G1CollectedHeap::expand(size_t expand_bytes, WorkGang* pretouch_workers, double* expand_time_ms) . See  the special case in expand 

  if (is_maximal_no_gc()) {
    log_debug(gc, ergo, heap)("Did not expand the heap (heap already fully expanded)");
    return false;
  }

-------------

Commit messages:
 - JDK-8259983

Changes: https://git.openjdk.java.net/jdk/pull/2148/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2148&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259983
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2148.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2148/head:pull/2148

PR: https://git.openjdk.java.net/jdk/pull/2148



More information about the hotspot-gc-dev mailing list