OSDN Git Service

Fix chaining offset mis-calculation for translations w/ large switch statements.
authorBen Cheng <bccheng@android.com>
Fri, 15 Jan 2010 23:29:33 +0000 (15:29 -0800)
committerBen Cheng <bccheng@android.com>
Fri, 15 Jan 2010 23:29:33 +0000 (15:29 -0800)
commitcec26f6ae3347d5ab3d60de02caca2e47151c6b2
tree77ac678d7568c94069c7dc235e5de1a7846b3a0c
parent44758206a5694fceb3859846f05eb9823ed65ec7
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.
vm/compiler/CompilerIR.h
vm/compiler/codegen/arm/ArchUtility.c
vm/compiler/codegen/arm/ArmLIR.h
vm/compiler/codegen/arm/Assemble.c
vm/compiler/codegen/arm/CodegenDriver.c
vm/compiler/codegen/arm/armv7-a/ArchVariant.c