OSDN Git Service

Check IsModifiableClass earlier in redefineClasses and retransformClasses
authorAlex Light <allight@google.com>
Mon, 6 Mar 2017 23:46:43 +0000 (15:46 -0800)
committerAlex Light <allight@google.com>
Tue, 7 Mar 2017 00:12:12 +0000 (16:12 -0800)
commitce6ee70ba59871b73bd7556f3bc75ce8e7d6451c
tree911c80f8bcd0d754a000647d993962622103733f
parentf9d80d72a686048200bcf6a7f37192f9eb75d5bd
Check IsModifiableClass earlier in redefineClasses and retransformClasses

We were not checking this until we actually tried to install the
definition. This meant that we could send dex file data to agents even
if there is no chance of it being used. We would also try to get the
dex file name for non-existant dex files causing crashes.

Bug: 31455788
Test: ./test/testrunner/testrunner.py --host -t 921-hello-failure
Change-Id: I647a057fe916861d555ae142a2961f449f1bc3a5
runtime/openjdkjvmti/ti_redefine.cc
runtime/openjdkjvmti/transform.cc
test/921-hello-failure/expected.txt
test/921-hello-failure/src/Main.java
test/921-hello-failure/src/Unmodifiable.java [new file with mode: 0644]