Check IsReferenceVReg during deopt
Required since the quick GC maps may not agree with the verifier
ones. Without this check we may copy stale object references into
the shadow frame.
(cherry picked from commit f00baf56ef647684888a407dbb6adadd704a2039)
Bug: 20736048
Change-Id: I7783c8a8ee45cf601b08b4c38f1dec7f7d11380c
diff --git a/runtime/utils.h b/runtime/utils.h
index eaafcf0..71ccf85 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -604,6 +604,11 @@
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
+inline bool TestBitmap(size_t idx, const uint8_t* bitmap) {
+ return ((bitmap[idx / kBitsPerByte] >> (idx % kBitsPerByte)) & 0x01) != 0;
+}
+
+
} // namespace art
#endif // ART_RUNTIME_UTILS_H_