DexFile: Add basic support for v38 dex files.
Makes sure they aren't rejected, essentially. Also adds positive
and negative test cases in dex_file_test.
bug: 30550796
Change-Id: I8c95055a22f8a1435868c8bf3497f9641b7bb900
test: make test-art-host
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index 16087a5..061babd 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -63,7 +63,9 @@
{'0', '3', '5', '\0'},
// Dex version 036 skipped because of an old dalvik bug on some versions of android where dex
// files with that version number would erroneously be accepted and run.
- {'0', '3', '7', '\0'}
+ {'0', '3', '7', '\0'},
+ // Dex version 038: Android "O" and beyond.
+ {'0', '3', '8', '\0'}
};
bool DexFile::GetChecksum(const char* filename, uint32_t* checksum, std::string* error_msg) {