Extend test 712-varhandle-invocations to check negative array indices.
Check that varhandle intrisics do not crash and delegate to slow path
when array index is negative. The runtime should throw an out-of-bounds
exception, which is caught and ignored by the test. Not throwing an
exception fails the test as well.
Bug: 71781600
Test: art/test.py -r -t 712-varhandle-invocations --host
Test: art/test.py -r -t 712-varhandle-invocations --target
Test: Manually change/remove the generated instructions that check for
negative array indices on arm64/x86_64 and ensure that the above test
crash in the generated code, as expected.
Change-Id: Id2c31b639ab63fd1f3fb7d521f9e6a3676535fe5
1 file changed