summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-05-29 13:12:15 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-05-29 13:16:05 +0900
commitaee36bf149bedf97007584ac5d6cd5d438be28b5 (patch)
treef2f2525ed7cc8e73534acc4332a372ae957932fa /iseq.c
parente04d10b28f47ea4d32f9562aedc4be9749415219 (diff)
Fix Possible Control flow issues (DEADCODE)
Coverity Scan says `Execution cannot reach this statement: "poison_object(v);"`, so do nothing when `ptr` is always 0 without address_sanitizer.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/iseq.c b/iseq.c
index b8895a53a5..916715e23f 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1087,9 +1087,7 @@ remove_coverage_i(void *vstart, void *vend, size_t stride, void *data)
ISEQ_COVERAGE_SET(iseq, Qnil);
}
- if (ptr) {
- asan_poison_object(v);
- }
+ asan_poison_object_if(ptr, v);
}
return 0;
}
@@ -3239,9 +3237,7 @@ trace_set_i(void *vstart, void *vend, size_t stride, void *data)
rb_iseq_trace_set(rb_iseq_check((rb_iseq_t *)v), turnon_events);
}
- if (ptr) {
- asan_poison_object(v);
- }
+ asan_poison_object_if(ptr, v);
}
return 0;
}