summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-09-23 13:53:57 -0400
committerPeter Zhu <[email protected]>2024-09-24 08:59:15 -0400
commite02a6097e690f9c3dc22e5ed469304a54cafd7b8 (patch)
tree15356b2133711716d109f61fbd0d68a682b97a17 /compile.c
parent8edd6e606f77e5cac764c00f0645d222ec80f711 (diff)
Set node_id to -1 in add_adjust_info
add_adjust_info will increment the insns_info_index, so we need to set the node_id to -1 to prevent a "Conditional jump or move depends on uninitialised value" in Valgrind.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11668
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index b726a03d59..a044a30abd 100644
--- a/compile.c
+++ b/compile.c
@@ -2465,6 +2465,7 @@ add_adjust_info(struct iseq_insn_info_entry *insns_info, unsigned int *positions
int insns_info_index, int code_index, const ADJUST *adjust)
{
insns_info[insns_info_index].line_no = adjust->line_no;
+ insns_info[insns_info_index].node_id = -1;
insns_info[insns_info_index].events = 0;
positions[insns_info_index] = code_index;
return TRUE;