On Tue, 20 Jan 2026 19:31:21 GMT, Chris Plummer <[email protected]> wrote:

>> We should execute jdwp command only when it's available 
>> (vm.canUseIsSameObject returns true) and the object is value object.
>> Note that isValueObject() may not work for old releases, so we need to check 
>> both conditions here or move version check to ClassTypeImpl.isValueClass
>
> If the JVM supports value objects, the debug agent has to support 
> IsSameObject and ObjectHashCode. I don't see how we can have a functional 
> JDWP and JDI otherwise. The logic above is proving that. It allows for the 
> impossible to support situation where isValueObject() can return true, yet 
> IsSameObject is not supported, meaning we can't properly compute the hash 
> code.
> 
> If IsValueObject returns true, the invariant should be that IsSameObject is 
> supported.

ok. updated this way

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1834#discussion_r2718754861

Reply via email to