summaryrefslogtreecommitdiffstats
path: root/runtime/utils.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-05-08 14:19:26 -0700
committerMathieu Chartier <mathieuc@google.com>2015-05-08 14:38:52 -0700
commitf00baf56ef647684888a407dbb6adadd704a2039 (patch)
tree1a7534f3711f505343543f3c02a2458e8606d235 /runtime/utils.h
parent8ee43e3ce18e90bfbf8cbeb05ff78ad281015d1a (diff)
downloadart-f00baf56ef647684888a407dbb6adadd704a2039.tar.gz
art-f00baf56ef647684888a407dbb6adadd704a2039.tar.bz2
art-f00baf56ef647684888a407dbb6adadd704a2039.zip
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. Bug: 20736048 Change-Id: I7783c8a8ee45cf601b08b4c38f1dec7f7d11380c
Diffstat (limited to 'runtime/utils.h')
-rw-r--r--runtime/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/utils.h b/runtime/utils.h
index eaafcf0a64..71ccf85277 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -604,6 +604,11 @@ std::unique_ptr<T> MakeUnique(Args&& ... args) {
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_