JDK-8226879 : Memory leak in Type::hashcons
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10,11,12,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-27
  • Updated: 2020-06-16
  • Resolved: 2019-06-28
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 13 JDK 14
11.0.8-oracleFixed 13.0.4Fixed 14 b04Fixed
Description
In http://hg.openjdk.java.net/jdk/jdk/file/8e0ae3830fca/src/hotspot/share/opto/type.cpp#l734
We allocate a new type in `xdual()` (line 732) but if the type is self symmetric we just discard it without calling `delete` in line 734.
Of course, it's only a leak in the per-compilation arena but it should still be fixed.
Comments
Fix request (13u): I would like to backport this fix to 13u for parity with 11u. The original change applies cleanly.
08-06-2020

jdk11 backport request I would like to have the patch in OpenJDK11 as well , because the issue is present there too. The patch applies cleanly.
13-05-2020

http://cr.openjdk.java.net/~thartmann/8226879/webrev.00/
27-06-2019

ILW = Memory leak in C2 per-compilation arena (all memory is freed after compilation), never showed up to be a problem, no workaround = MLH = P4
27-06-2019