On Wed, 20 Nov 2024 18:09:08 GMT, Adam Bruce <d...@openjdk.org> wrote:
> This PR fixes a long-standing bug in JDWP where the access flags of a field > are not checked before attempting to read it's value. > > Prior to this change, attempting to read a non-static field would cause a JVM > crash, this change corrects that behaviour by returning `INVALID_FIELDID` > instead. > > This is my first PR to OpenJDK, so please let me know if I've made any > mistakes in the process. > > Cheers, > Adam The following two tests would be good starting points for writing new test cases. You can clone them and then modify them to expect errors due to static mismatch. test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/GetValues/getvalues001.java test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/GetValues/getvalues001.java ------------- PR Comment: https://git.openjdk.org/jdk/pull/22280#issuecomment-2489967303