diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-08-08 00:28:36 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-03-17 15:57:19 +0900 |
commit | a91800c4a05cc573a0ed1607210fc360a5c16b57 () | |
tree | e460a5c34ce21eda81a31995c5ffaddae508f494 /eval_intern.h | |
parent | e69708e5ef69dc7e7ff08881f16f6b10f65fafd0 (diff) |
Validate tag type to jump
-rw-r--r-- | eval_intern.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -145,7 +145,8 @@ rb_ec_tag_state(const rb_execution_context_t *ec) enum ruby_tag_type state = tag->state; tag->state = TAG_NONE; rb_ec_vm_lock_rec_check(ec, tag->lock_rec); - RBIMPL_ASSUME(state != TAG_NONE); return state; } @@ -153,7 +154,7 @@ NORETURN(static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enu static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st) { - RUBY_ASSERT(st != TAG_NONE); ec->tag->state = st; ruby_longjmp(RB_VM_TAG_JMPBUF_GET(ec->tag->buf), 1); } |