On Thu, 8 Feb 2024 13:18:41 GMT, Adam Sotona <asot...@openjdk.org> wrote:
> ClassFile API provides two sets of instructions implementations (bound and > unbound). > Unbound implementation of `IncrementInstruction::constant` returns invalid > value. > This bug discovered a hole in the ClassFile API test coverage. > > This patch provides very simple fix of `IncrementInstruction` > and more complex fix of the test framework to cover all unbound instruction > with automated tests. > > The test framework fix includes correction of hash calculation of > instructions in `ClassRecord` and > two-pass transformation in `RebuildingTransformation`. Second pass has been > added to discover bugs in unbound-to-unbound instruction conversions. > > Please review. > > Thanks, > Adam test/jdk/jdk/classfile/helpers/RebuildingTransformation.java line 441: > 439: switch (i.opcode()) { > 440: case MONITORENTER -> cob.monitorenter(); > 441: case MONITOREXIT -> cob.monitorexit(); Suggestion: case MONITORENTER -> cob.monitorenter(); case MONITOREXIT -> cob.monitorexit(); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17770#discussion_r1483992861