diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-06-21 10:27:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 10:27:04 -0700 |
commit | d9f608b6869abccb86aefd2d1be227a5ea40e4d1 (patch) | |
tree | 30adb7e0816416c9a85ffd29213fe342331e6a64 /vm_insnhelper.h | |
parent | aec8e6d379a9dbb6c871090d93a3db4e60954b94 (diff) |
Verify builtin inline annotation with VM_CHECK_MODE (#3244)
* Verify builtin inline annotation with VM_CHECK_MODE
* Remove static to fix the link issue on MJIT
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r-- | vm_insnhelper.h | 14 |
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 /**********************************************************/ |