summaryrefslogtreecommitdiff
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 5f51ccc964..702c3b7fc3 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -139,27 +139,27 @@ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enable
/**********************************************************/
#if VM_CHECK_MODE > 0
-#define SETUP_CANARY() \
+#define SETUP_CANARY(cond) \
VALUE *canary = 0; \
- if (leaf) { \
+ if (cond) { \
canary = GET_SP(); \
SET_SV(vm_stack_canary); \
} \
else {\
SET_SV(Qfalse); /* cleanup */ \
}
-#define CHECK_CANARY() \
- if (leaf) { \
+#define CHECK_CANARY(cond, insn) \
+ if (cond) { \
if (*canary == vm_stack_canary) { \
*canary = Qfalse; /* cleanup */ \
} \
else { \
- vm_canary_is_found_dead(INSN_ATTR(bin), *canary); \
+ vm_canary_is_found_dead(insn, *canary); \
} \
}
#else
-#define SETUP_CANARY() /* void */
-#define CHECK_CANARY() /* void */
+#define SETUP_CANARY(cond) /* void */
+#define CHECK_CANARY(cond, insn) /* void */
#endif
/**********************************************************/