RFR: 8259580: Shenandoah: uninitialized label in VerifyThreadGCState

Aleksey Shipilev shade at openjdk.java.net
Tue Jan 12 10:55:03 UTC 2021


On Mon, 11 Jan 2021 20:54:28 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> "label" is passed, but never hooked into the field. So instead of reporting a GC bug, Verifier would probably crash itself trying to read garbage memory.
>
> src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp line 606:
> 
>> 604: private:
>> 605:   const char* const _label;
>> 606:          char const _expected;
> 
> Why can't _expected not be const char* const too? Are we really messing with the string on the way?

`_expected` is not `const char*`, it is `const char`, where `const` is placed near the field identifier for consistency.

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

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



More information about the hotspot-gc-dev mailing list