RFR: JDK-8274435: EXCEPTION_ACCESS_VIOLATION in BFSClosure::closure_impl [v2]

Ekaterina Vergizova evergizova at openjdk.java.net
Thu Sep 30 21:54:08 UTC 2021


On Thu, 30 Sep 2021 11:37:15 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Ekaterina Vergizova has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   JDK-8274435: EXCEPTION_ACCESS_VIOLATION in BFSClosure::closure_impl
>
> src/hotspot/share/jfr/leakprofiler/chains/bitset.inline.hpp line 71:
> 
>> 69: inline CHeapBitMap* BitSet::get_fragment_bits(uintptr_t addr) {
>> 70:   uintptr_t granule = addr >> _bitmap_granularity_shift;
>> 71:   if (granule == _last_fragment_granule && _last_fragment_bits != NULL) {
> 
> Did you consider changing the initial value of _last_fragment_granule to an invalid granule value (say ~uintptr_t(0))?
> 
> That would allow you to keep the old code, which I think  is a little bit easier to understand. With that, either _last_fragment_granule is uninitialized and will never match `granule`, or it has a valid granule value, which can be used to check if we have a properly set up _last_fragment_bits.

Good idea, thanks! I've updated the PR.

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

PR: https://git.openjdk.java.net/jdk/pull/5736


More information about the hotspot-jfr-dev mailing list