Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit df03093

Browse files
committed
fix: release OP_TIL literal in ray_graph_free
OP_TIL stores its count as ext->literal (ray_i64(n)). The graph cleanup only released literals for OP_CONST nodes, leaking the OP_TIL atom on every sum/avg/min/max call that built a DAG.
1 parent 36ea5b2 commit df03093

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ops/graph.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ void ray_graph_free(ray_graph_t* g) {
215215
/* M6: Release OP_CONST literal values before freeing ext nodes */
216216
for (uint32_t i = 0; i < g->ext_count; i++) {
217217
ray_op_ext_t* ext = g->ext_nodes[i];
218-
if (ext && g->nodes[ext->base.id].opcode == OP_CONST && ext->literal) {
218+
if (ext && (g->nodes[ext->base.id].opcode == OP_CONST ||
219+
g->nodes[ext->base.id].opcode == OP_TIL) && ext->literal) {
219220
ray_release(ext->literal);
220221
}
221222
/* Release runtime-built SIP bitmaps on graph traversal nodes */

0 commit comments

Comments
 (0)