diff options
author | Elliott Hughes <enh@google.com> | 2013-08-02 15:41:00 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2013-09-16 14:07:27 -0700 |
commit | 4b44ea2e3a8f5d5f30926095b0e5d803d406fbef (patch) | |
tree | 3d328d61ae3e125e117e9bdba7b93890ae170f92 /vm | |
parent | 7c5e6a3268dc25207633ce1ff5958ce705aba77a (diff) | |
download | android_dalvik-4b44ea2e3a8f5d5f30926095b0e5d803d406fbef.tar.gz android_dalvik-4b44ea2e3a8f5d5f30926095b0e5d803d406fbef.tar.bz2 android_dalvik-4b44ea2e3a8f5d5f30926095b0e5d803d406fbef.zip |
Ignore invalid access flags.
Bug: 10134551
Change-Id: I9df8f7a2541e0c9bd2f9294a202fef2afce815f8
Diffstat (limited to 'vm')
-rw-r--r-- | vm/oo/Class.cpp | 3 | ||||
-rw-r--r-- | vm/oo/Object.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp index 78a227310..db5340ef5 100644 --- a/vm/oo/Class.cpp +++ b/vm/oo/Class.cpp @@ -1740,6 +1740,9 @@ static ClassObject* loadClassFromDex0(DvmDex* pDvmDex, * Make sure the aren't any "bonus" flags set, since we use them for * runtime state. */ + /* bits we can reasonably expect to see set in a DEX access flags field */ + const uint32_t EXPECTED_FILE_FLAGS = (ACC_CLASS_MASK | CLASS_ISPREVERIFIED | + CLASS_ISOPTIMIZED); if ((pClassDef->accessFlags & ~EXPECTED_FILE_FLAGS) != 0) { ALOGW("Invalid file flags in class %s: %04x", descriptor, pClassDef->accessFlags); diff --git a/vm/oo/Object.h b/vm/oo/Object.h index ca4115733..92438ba61 100644 --- a/vm/oo/Object.h +++ b/vm/oo/Object.h @@ -82,10 +82,6 @@ enum ClassFlags { CLASS_ISPREVERIFIED = (1<<16), // class has been pre-verified }; -/* bits we can reasonably expect to see set in a DEX access flags field */ -#define EXPECTED_FILE_FLAGS \ - (ACC_CLASS_MASK | CLASS_ISPREVERIFIED | CLASS_ISOPTIMIZED) - /* * Get/set class flags. */ |