Skip to content

Fixes #267 #268 #271 #272 — temp arena, recursion, @max_iterations, bigint/HashMap - #393

Merged
godofecht merged 3 commits into
mainfrom
cursor/misra-euler-batch-b994
Aug 10, 2026
Merged

godofecht merged 3 commits into
mainfrom
cursor/misra-euler-batch-b994

Conversation

@godofecht

@godofecht godofecht commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes strcat/closure heap leaks and lands Euler-oriented stdlib + MISRA control-flow gates. Independent of open PR #288 (null deref / if-expressions).

#267 / #268 — temp arena

  • flow_temp_alloc / flow_temp_free_all with atexit
  • flow_strcat and escaping closure envs allocate from the arena

#271 / #272 — control flow under safety/flight

  • Recursion rejected via safety manifest (MISRA 17.2)
  • while requires @max_iterations(N); C emits a runtime counter/abort
  • Counted for loops remain allowed without attributes

#252 (partial) — Euler stdlib

#273 (partial)

  • safety/flight now enforce recursion + loop bounds; flight≡safety otherwise

Test plan

  • pytest tests/unit/test_misra_euler_batch.py
  • FLOW_HOST=python ./flow run examples/basics/hashmap_i64_smoke.flow → 30
  • FLOW_HOST=python ./flow run examples/basics/bigint_smoke.flow → 7
Open in Web Open in Cursor 

@cursor cursor Bot changed the title Fixes #267 #268 — temp arena; bigint + HashMap_i64_i64; safety recursion Fixes #267 #268 #271 #272 — temp arena, recursion, @max_iterations, bigint/HashMap Aug 10, 2026
@godofecht
godofecht marked this pull request as ready for review August 10, 2026 11:08
@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

cursoragent and others added 3 commits August 10, 2026 12:09
Close strcat/closure malloc leaks via flow_temp_alloc + atexit (#267/#268).
Add limb bigint and HashMap_i64_i64 for Euler (#252). Reject recursion under
--profile safety|flight via the safety manifest (#273 partial).

Co-authored-by: Abhishek Shivakumar <[email protected]>
Require @max_iterations(N) on while loops when FLOW_PROFILE=safety|flight,
emit a C runtime abort guard, and rewrite HashMap probes to bounded for-loops.
Also closes recursion detection under the same profiles (#271).

Co-authored-by: Abhishek Shivakumar <[email protected]>
@godofecht
godofecht force-pushed the cursor/misra-euler-batch-b994 branch from fb312c9 to 394c7df Compare August 10, 2026 11:09
@godofecht
godofecht merged commit 599bd23 into main Aug 10, 2026
@godofecht
godofecht deleted the cursor/misra-euler-batch-b994 branch August 10, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants