JDK-8253763 : ParallelObjectIterator should have virtual destructor
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-29
  • Updated: 2021-09-08
  • Resolved: 2020-09-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.14Fixed 16 b18Fixed
Related Reports
Relates :  
Description
The ParallelObjectIterator should have virtual destructor, since implementations of CollectedHeap::parallel_object_iterator() returns the base type, which is later passed to the delete operator.

Today both G1 and Shenandoah leaks memory here. I noticed this bug when when implementing ZCollectedHeap::parallel_object_iterator(). Bug was introduced in JDK-8215624.
Comments
Fix request (11u) on behalf of [~lzang]: Follow up of JDK-8215624, included in its backport.
08-09-2021

Changeset: 6d19fe65 Author: Per Liden <pliden@openjdk.org> Date: 2020-09-29 08:39:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/6d19fe65
29-09-2020