Use static thread safety analysis when available, and fix the bugs GCC finds.
It's impossible to express the Heap locking and the ThreadList locking with
GCC, but Clang is supposed to be able to do it. This patch does what's possible
for now.
Change-Id: Ib64a890c9d27c6ce255d5003cb755c2ef1beba95
diff --git a/src/dex_file.h b/src/dex_file.h
index 29ce087..9fcdeb0 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -866,7 +866,7 @@
// A cached com.android.dex.Dex instance, possibly NULL. Use GetDexObject.
mutable Mutex dex_object_lock_;
- mutable jobject dex_object_;
+ mutable jobject dex_object_ GUARDED_BY(dex_object_lock_);
// Points to the header section.
const Header* header_;