JDK-8281520 : JFR: A wrong parameter is passed to the constructor of LeakKlassWriter
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-09
  • Updated: 2022-02-11
  • Resolved: 2022-02-11
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
11.0.15 teamFixed
Related Reports
Relates :  
Relates :  
Description
The following code(jfrTypeSet.cpp:L388) passes a wrong parameter `_artifacts` to the constructor of LeakKlassWriter:
```
 387   } else {
 388     LeakKlassWriter lkw(_leakp_writer, _artifacts, _class_unload);
 389     CompositeKlassWriter ckw(&lkw, &kw);
 390     CompositeKlassWriterRegistration ckwr(&ckw, &reg);
 391     CompositeKlassCallback callback(&ckwr);
 392     _subsystem_callback = &callback;
 393     do_klasses();
 394   }
```

This problem is introduced by JDK-8225797 and fixed by JDK-8233111.
I filed a new issue to fix it since I think backporting JDK-8233111 is not necessary for the moment.

Comments
Changeset: 29eb422c Author: Denghui Dong <ddong@openjdk.org> Committer: Paul Hohensee <phh@openjdk.org> Date: 2022-02-11 16:48:03 +0000 URL: https://git.openjdk.java.net/jdk11u-dev/commit/29eb422cb843e76c31bd9b3253359ceccb48082b
11-02-2022

Fix Request (11u). Fixes a wrong parameter problem introduced by JDK-8225797. This problem is already fixed by JDK-8233111, but the original patch is too large and not very relevant to it. Hence, I filed a new issue.
10-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/813 Date: 2022-02-09 06:53:33 +0000
09-02-2022