[master] RFR: Deflate monitors of dead objects before they become unreachable
Roman Kennke
rkennke at openjdk.java.net
Wed Nov 17 21:55:29 UTC 2021
I've seen occasional failures in G1, where the refinement thread tries to parse a heap region that has dead objects, and would sometimes see an object with a monitor that has already been deflated. And because deflation does not bother to restore the header of dead objects, it would reach to unknown memory and crash.
The fix is to restore the header of dead objects just before they become unreachable. This can be done in the closures used by WeakProcessor::weak_oops_do(), right before the weak root will be cleared.
Testing:
- [x] tier1
- [ ] tier2
- [ ] tier3
- [ ] tier4
-------------
Commit messages:
- Deflate monitors of dead objects before they become unreachable
Changes: https://git.openjdk.java.net/lilliput/pull/28/files
Webrev: https://webrevs.openjdk.java.net/?repo=lilliput&pr=28&range=00
Stats: 19 lines in 4 files changed: 19 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/lilliput/pull/28.diff
Fetch: git fetch https://git.openjdk.java.net/lilliput pull/28/head:pull/28
PR: https://git.openjdk.java.net/lilliput/pull/28
More information about the lilliput-dev
mailing list