summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Fox Ivey <aiden.foxivey@shopify.com>2025-09-30 12:43:22 -0400
committerTakashi Kokubun <takashikkbn@gmail.com>2025-09-30 11:50:45 -0700
commit0a4bfb6499041535bebe7a6f5f27cc083716427e (patch)
tree99a5ffb4787ca094f665321f92f5e65f6f045e40
parent0f3d3c78530260ef1b44f7b7808a3e0e009d54f0 (diff)
ZJIT: Add correction rb_zjit_exit_locations_dict
-rw-r--r--zjit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zjit.c b/zjit.c
index 1affda0caf..d877c0bacb 100644
--- a/zjit.c
+++ b/zjit.c
@@ -93,8 +93,9 @@ rb_zjit_exit_locations_dict(VALUE *zjit_raw_samples, int *zjit_line_samples, int
int line_num = (int)zjit_line_samples[idx];
idx++;
- rb_ary_push(raw_samples, SIZET2NUM(num));
- rb_ary_push(line_samples, INT2NUM(line_num));
+ // + 1 as we append an additional sample for the insn
+ rb_ary_push(raw_samples, SIZET2NUM(num + 1));
+ rb_ary_push(line_samples, INT2NUM(line_num + 1));
// Loop through the length of samples_len and add data to the
// frames hash. Also push the current value onto the raw_samples