[jdk18u] RFR: 8283469: Don't use memset to initialize members in FileMapInfo and fix memory leak
Paul Hohensee
phh at openjdk.java.net
Thu May 12 21:23:57 UTC 2022
On Mon, 11 Apr 2022 18:13:17 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> I would like to backport this patch to 18u, to fix a memory leak, also eliminates dangerous `memset` call, could potentially result in fatal crash.
>
> The original patch does not apply cleanly, due to JDK-8261455, where it changed `FileMapInfo`'s constructor signature to pass in `full_path` as a parameter. The conflict is resolved manually by initializing `_full_path` to `nullptr`
>
> Test:
>
> - [x] hotspot_cds
Leave the file close in, it's an obvious bug if it isn't. Lgtm.
-------------
Marked as reviewed by phh (Reviewer).
PR: https://git.openjdk.java.net/jdk18u/pull/97
More information about the jdk-updates-dev
mailing list