--- old/src/share/vm/gc_implementation/g1/g1InCSetState.hpp 2014-12-16 11:05:45.137851429 +0100 +++ new/src/share/vm/gc_implementation/g1/g1InCSetState.hpp 2014-12-16 11:05:45.079849745 +0100 @@ -30,6 +30,7 @@ // Per-region state during garbage collection. struct InCSetState { + private: // We use different types to represent the state value. Particularly SPARC puts // values in structs from "left to right", i.e. MSB to LSB. This results in many // unnecessary shift operations when loading and storing values of this type. @@ -75,7 +76,7 @@ #ifdef ASSERT bool is_default() const { return is_not_in_cset(); } - bool is_valid() const { return _value < Num; } + bool is_valid() const { return (_value >= Humongous) && (_value < Num); } bool is_valid_gen() const { return (_value >= Young && _value <= Old); } #endif };