diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-09 02:36:40 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-09 02:36:40 +0000 |
commit | bbbbd3139a4a3b0c4b732319c80ae3cbeda446da (patch) | |
tree | b3d7872f76b8b1c72c6efd968b9ac4a3bb7e9a30 | |
parent | 505f6343e3c46240f08af010d7d6c534406618fe (diff) | |
parent | 1318d30f175f3842cbbbe93849df28a2fc1831a4 (diff) | |
download | dalvik-bbbbd3139a4a3b0c4b732319c80ae3cbeda446da.tar.gz |
Snap for 5180536 from 1318d30f175f3842cbbbe93849df28a2fc1831a4 to pi-platform-releasepie-platform-release
Change-Id: Ib3e45c17ec9a70f88e9c7611e2608f14fc6211ee
-rwxr-xr-x | dx/tests/run-test | 10 | ||||
-rw-r--r-- | libdex/DexOpcodes.h | 6 | ||||
-rw-r--r-- | libdex/DexSwapVerify.cpp | 3 |
3 files changed, 11 insertions, 8 deletions
diff --git a/dx/tests/run-test b/dx/tests/run-test index f205c4690..a781d8d59 100755 --- a/dx/tests/run-test +++ b/dx/tests/run-test @@ -54,6 +54,7 @@ run="run" expected="expected.txt" output="out.txt" +clean_on_exit="yes" dev_mode="no" update_mode="no" tmpdir=/tmp/test-$$ @@ -61,7 +62,8 @@ usage="no" while [[ "x$1" = "x-"* ]]; do case $1 in - --dev) dev_mode="yes" ;; + --dev) dev_mode="yes" ;; + --no-clean) clean_on_exit="no" ;; --output_dir) tmpdir=$2 shift ;; @@ -156,7 +158,11 @@ fi if [ "$good" = "yes" ]; then cd "$oldwd" - rm -rf "$tmpdir" + if [ "$clean_on_exit" = "yes" ]; then + rm -rf "$tmpdir" + else + echo "Test artifacts left in $tmpdir" + fi exit 0 fi diff --git a/libdex/DexOpcodes.h b/libdex/DexOpcodes.h index 1c684ab63..f4dcd6b51 100644 --- a/libdex/DexOpcodes.h +++ b/libdex/DexOpcodes.h @@ -609,11 +609,7 @@ DEX_INLINE Opcode dexOpcodeFromCodeUnit(u2 codeUnit) { * that data tables get generated in a consistent way. */ int lowByte = codeUnit & 0xff; - if (lowByte != 0xff) { - return (Opcode) lowByte; - } else { - return (Opcode) ((codeUnit >> 8) | 0x100); - } + return (Opcode) lowByte; } /* diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp index 8836ab227..1f8eed828 100644 --- a/libdex/DexSwapVerify.cpp +++ b/libdex/DexSwapVerify.cpp @@ -2908,7 +2908,8 @@ bool dexHasValidMagic(const DexHeader* pHeader) if ((memcmp(version, DEX_MAGIC_VERS, 4) != 0) && (memcmp(version, DEX_MAGIC_VERS_API_13, 4) != 0) && (memcmp(version, DEX_MAGIC_VERS_37, 4) != 0) && - (memcmp(version, DEX_MAGIC_VERS_38, 4) != 0)) { + (memcmp(version, DEX_MAGIC_VERS_38, 4) != 0) && + (memcmp(version, DEX_MAGIC_VERS_39, 4) != 0)) { /* * Magic was correct, but this is an unsupported older or * newer format variant. |