[jdk11u-dev] RFR: 8283469: Don't use memset to initialize members in FileMapInfo and fix memory leak
Zhengyu Gu
zgu at openjdk.java.net
Fri May 13 15:24:30 UTC 2022
I would like to backport this patch to 11u, to fix a memory leak, also eliminates dangerous memset call, could potentially result in fatal crash.
The original patch does not apply cleanly:
1. File moved
2. A lot of context differences
Applied/updated patch manually.
I also bought down following code from [JDK-8261455](https://bugs.openjdk.java.net/browse/JDK-8261455), given it is a P4 enhancement, I don't see it is a candidate for backport itself. But following code obviously fixes a bug that leaves file open after use.
if (_file_open) {
os::close(_fd);
}
Test:
- [x] hotspot_cds on Linux x86_64
- [x] hotspot_appcds on Linux x86_64
- [ ] GHA
-------------
Commit messages:
- Backport d6fa8b004bcd0a2fc1015055d0177428889b4c31
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/1084/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=1084&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8283469
Stats: 12 lines in 1 file changed: 8 ins; 3 del; 1 mod
Patch: https://git.openjdk.java.net/jdk11u-dev/pull/1084.diff
Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/1084/head:pull/1084
PR: https://git.openjdk.java.net/jdk11u-dev/pull/1084
More information about the jdk-updates-dev
mailing list