hellas-ai / hellas-ai/catena-lang

side-effecting operations like `buf.free` within a reduce will double-free

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
bug lang
Dominant language
Rust
Stars
2
Forks
1
Avg merge
1d 12h
Merged PRs (30d)
7

Description

We need `buf.free` for efficiency, but currently one can smuggle a buffer into a closure's environment and then free it.
Inside a

Some ideas:

- `defer` requires something like `Copy` in Rust
- Compiler builds in a check for "known bad" values that shouldn't be allowed in a closure's environment (hack alert)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how buf.free is handled inside reduce and how a closure captures its environment. Reproduce the double-free case described in the issue, then determine the ownership or compiler rule needed to prevent side-effecting operations from escaping safely; the issue's proposed approaches are defer with Copy-like behavior or a compiler check for known-bad captured values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.