[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 18:37:27 UTC 2023


On Wed, 21 Jun 2023 15:39:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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.

There are some infra problems with testing. But GC tests have passed, so I am integrating.

-------------

PR Comment: https://git.openjdk.org/lilliput-jdk17u/pull/40#issuecomment-1601378213


More information about the lilliput-dev mailing list