aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/ArchUtility.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@android.com>2010-01-15 15:29:33 -0800
committerBen Cheng <bccheng@android.com>2010-01-15 15:29:33 -0800
commitcec26f6ae3347d5ab3d60de02caca2e47151c6b2 (patch)
tree77ac678d7568c94069c7dc235e5de1a7846b3a0c /vm/compiler/codegen/arm/ArchUtility.c
parent44758206a5694fceb3859846f05eb9823ed65ec7 (diff)
Fix chaining offset mis-calculation for translations w/ large switch statements.
Bug: 2369821 There are 12 bytes of additional code after the 65th chaining cell. So if a switch statement with more than that many cases is translated by the JIT, it will run fine until the next unchaining event, which will patch the wrong code and lead to all kinds of unexpected crashes.
Diffstat (limited to 'vm/compiler/codegen/arm/ArchUtility.c')
-rw-r--r--vm/compiler/codegen/arm/ArchUtility.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/compiler/codegen/arm/ArchUtility.c b/vm/compiler/codegen/arm/ArchUtility.c
index d8cac49f3..20b3f85a7 100644
--- a/vm/compiler/codegen/arm/ArchUtility.c
+++ b/vm/compiler/codegen/arm/ArchUtility.c
@@ -244,6 +244,9 @@ void dvmDumpLIRInsn(LIR *arg, unsigned char *baseAddr)
/* Handle pseudo-ops individually, and all regular insns as a group */
switch(lir->opCode) {
+ case kArmChainingCellBottom:
+ LOGD("-------- end of chaining cells (0x%04x)\n", offset);
+ break;
case kArmPseudoBarrier:
LOGD("-------- BARRIER");
break;