Fix test to search for a populated StackMap.
With the baseline compiler, the test could have hit a stack map for a
NullCheck, where we don't populate the reference StackMask in the stack
map. To fix this, look for another stack map starting at the same dex
pc.
Test: 004-ReferenceMap
Change-Id: I2628ded5c89c6fb0059a18341bffda78ef06f197
diff --git a/test/004-ReferenceMap/stack_walk_refmap_jni.cc b/test/004-ReferenceMap/stack_walk_refmap_jni.cc
index 4c344a3..4317b5d 100644
--- a/test/004-ReferenceMap/stack_walk_refmap_jni.cc
+++ b/test/004-ReferenceMap/stack_walk_refmap_jni.cc
@@ -20,17 +20,21 @@
namespace art {
-#define CHECK_REGS_CONTAIN_REFS(dex_pc, abort_if_not_found, ...) do { \
- int t[] = {__VA_ARGS__}; \
- int t_size = sizeof(t) / sizeof(*t); \
- const OatQuickMethodHeader* method_header = GetCurrentOatQuickMethodHeader(); \
- uintptr_t native_quick_pc = method_header->ToNativeQuickPc(GetMethod(), \
- dex_pc, \
- /* is_catch_handler */ false, \
- abort_if_not_found); \
- if (native_quick_pc != UINTPTR_MAX) { \
- CheckReferences(t, t_size, method_header->NativeQuickPcOffset(native_quick_pc)); \
- } \
+#define CHECK_REGS_CONTAIN_REFS(dex_pc, abort_if_not_found, ...) do { \
+ int t[] = {__VA_ARGS__}; \
+ int t_size = sizeof(t) / sizeof(*t); \
+ const OatQuickMethodHeader* method_header = GetCurrentOatQuickMethodHeader(); \
+ uintptr_t native_quick_pc = method_header->ToNativeQuickPc(GetMethod(), \
+ dex_pc, \
+ /* is_catch_handler */ false, \
+ abort_if_not_found); \
+ if (native_quick_pc != UINTPTR_MAX) { \
+ CheckReferences(t, \
+ t_size, \
+ dex_pc, \
+ method_header->NativeQuickPcOffset(native_quick_pc), \
+ /* search_for_valid_stack_map= */ true); \
+ } \
} while (false);
struct ReferenceMap2Visitor : public CheckReferenceMapVisitor {