Branch-to-self is a backward branch.
Teach the verifier to identify branch-to-self as a backward branch,
which makes the instruction a GC point and worthy of a register map.
For bug 2702514.
Change-Id: Id5b26220db8008adbb2b5b7f69894a7704a0b559
diff --git a/vm/analysis/DexVerify.c b/vm/analysis/DexVerify.c
index 9309a11..3793a4e 100644
--- a/vm/analysis/DexVerify.c
+++ b/vm/analysis/DexVerify.c
@@ -505,7 +505,7 @@
int offset = -1;
bool unused;
if (dvmGetBranchTarget(meth, insnFlags, i, &offset, &unused)) {
- if (offset < 0) {
+ if (offset <= 0) {
dvmInsnSetGcPoint(insnFlags, i, true);
}
} else {