RFR: 8301988: VerifyLiveClosure::verify_liveness asserts on bad pointers outside heap [v2]

David Holmes dholmes at openjdk.org
Wed Feb 8 02:29:44 UTC 2023


On Tue, 7 Feb 2023 15:41:28 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>>   can I have reviews for this change to liveness verification that fixes some unwanted asserts because
>> 
>>  - it uses decode_not_null which will assert if the given oop address is not in the heap, making the remainder of the verification useless in that case
>> - if the referenced object is not in the heap, we try to get its heap region too when printing, which also fails some assertions
>> - in the innermost if lots of code is duplicated in both cases 
>> 
>> The first two issues are really annoying (there is another one when the `Klass` is garbage when calling `is_obj_dead_cond`, but I'll try to improve that separately).
>> 
>> Testing: local compilation/testing, gha
>> 
>> Thanks,
>>   Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Missing changes

Mostly seems quite reasonable based on the description, but one query below.

Thanks.

src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp line 217:

> 215: 
> 216: inline bool G1CollectedHeap::is_obj_filler(const oop obj) {
> 217:   Klass* k = obj->klass_raw();

Not clear how you can get here from ` HeapRegion::is_obj_dead` with a bad oop, such that you need the raw variant. ??

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

PR: https://git.openjdk.org/jdk/pull/12456


More information about the hotspot-dev mailing list