[master] RFR: Fix self-forwarding on 32 bit platforms [v2]
Roman Kennke
rkennke at openjdk.java.net
Fri Oct 15 12:00:37 UTC 2021
> Self-forwarding as implemented by #10 uses the 3rd header bit to indicate self-forwarded object. However, on 32bit platforms, oops are only 4-byte-aligned, and a regular forwarding may set the 3rd bit, and thus make it look like self-forwarded. This breaks one of the gtests, and potentially causes severe heap corruption. OTOH, on 32 bit platforms we don't need to preserve the upper header bits, and can therefore use regular forwarding mechanism to do self-forwarding (as it was before #10).
>
> The change also changes the test_preservedMarks.cpp gtest to install 0b1 as original mark, not 0b11 which would also look like a forwarded object. It has not caused failure because it was not tested before the forwarding gets installed, but is wrong nonetheless.
>
> Testing:
> - [x] gtest (which was failing before)
> - [x] tier1
> - [x] tier2
> - [x] hotspot_gc
Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
Special-case forward_to_self_atomic() for 32bits
-------------
Changes:
- all: https://git.openjdk.java.net/lilliput/pull/23/files
- new: https://git.openjdk.java.net/lilliput/pull/23/files/5b39c962..f3c49060
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=lilliput&pr=23&range=01
- incr: https://webrevs.openjdk.java.net/?repo=lilliput&pr=23&range=00-01
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/lilliput/pull/23.diff
Fetch: git fetch https://git.openjdk.java.net/lilliput pull/23/head:pull/23
PR: https://git.openjdk.java.net/lilliput/pull/23
More information about the lilliput-dev
mailing list