JDK-8235998 : [C2] Memory leaks during tracing after "8224193: stringStream should not use Resource Area".
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.6,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-16
  • Updated: 2022-06-27
  • Resolved: 2019-12-21
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 JDK 15
11.0.7-oracleFixed 13.0.4Fixed 14 b29Fixed 15Fixed
Related Reports
Relates :  
Relates :  
Description
PrintInlining and TraceLoopPredicate allocate stringStreams with new and relied on the fact that all memory used is on the ResourceArea cleaned after the compilation. 

Since 8224193 the char* of the stringStream is malloced and thus must be freed. No doing so manifests a memory leak.

This is only relevant if the corresponding tracing is active.

Comments
Fix request (13u): The original change applies cleanly, passes tier1 and tier2 tests.
03-06-2020

Fix request (11u) I would like to downport this for parity with 11.0.7-oracle. Applies clean.
13-01-2020

URL: https://hg.openjdk.java.net/jdk/jdk14/rev/048ef0e2ba9f User: goetz Date: 2019-12-21 08:14:21 +0000
21-12-2019

ILW = Memory leak, with C2 and tracing enabled, no workaround other than to disable tracing = HLM = P3
16-12-2019