From 5b65e76a7d3aa5d6111fbf2b5bf371bdf478c352 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 24 Sep 2025 07:10:31 +0900 Subject: fix lvar_state dump size `ibf_dump_write()` should consider the size of the element. --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile.c b/compile.c index fb269721f3..d3b9704cc9 100644 --- a/compile.c +++ b/compile.c @@ -13272,7 +13272,7 @@ ibf_dump_lvar_states(struct ibf_dump *dump, const rb_iseq_t *iseq) const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq); const int size = body->local_table_size; IBF_W_ALIGN(enum lvar_state); - return ibf_dump_write(dump, body->lvar_states, body->lvar_states ? size : 0); + return ibf_dump_write(dump, body->lvar_states, sizeof(enum lvar_state) * (body->lvar_states ? size : 0)); } static enum lvar_state * -- cgit v1.2.3