[lilliput-jdk17u:lilliput] RFR: 8310558: [Lilliput/JDK17] Missing klass gap initialization in ContiguousSpace::allocate_temporary_filler
Aleksey Shipilev
shade at openjdk.org
Wed Jun 21 15:46:31 UTC 2023
Minor thing, but still.
This is Lilliput JDK 17 specific, later versions have [JDK-8278568](https://bugs.openjdk.org/browse/JDK-8278568) refactoring.
We have missed the `set_klass_gap(0)` line in the patch here:
} else {
assert(size == CollectedHeap::min_fill_size(),
"size for smallest fake object doesn't match");
instanceOop obj = (instanceOop) cast_to_oop(allocate(size));
- obj->set_mark(markWord::prototype());
- obj->set_klass_gap(0);
- obj->set_klass(vmClasses::Object_klass());
+ if (UseCompactObjectHeaders) {
+ obj->set_mark(vmClasses::Object_klass()->prototype_header());
+ } else {
+ obj->set_mark(markWord::prototype());
+ obj->set_klass(vmClasses::Object_klass());
+ }
}
}
I had to restore the klass gap methods in `oop`, which also limits the impact we have on upstream code.
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/lilliput-jdk17u/pull/40/files
Webrev: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=40&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8310558
Stats: 13 lines in 3 files changed: 13 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/lilliput-jdk17u/pull/40.diff
Fetch: git fetch https://git.openjdk.org/lilliput-jdk17u.git pull/40/head:pull/40
PR: https://git.openjdk.org/lilliput-jdk17u/pull/40
More information about the lilliput-dev
mailing list