Skip to content

fix(builtins): add recursion depth limit to AWK function calls#473

Merged
chaliy merged 1 commit intomainfrom
claude/fix-431-Y2nIj
Mar 2, 2026
Merged

fix(builtins): add recursion depth limit to AWK function calls#473
chaliy merged 1 commit intomainfrom
claude/fix-431-Y2nIj

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 2, 2026

Summary

  • AWK user-defined recursive functions had no depth limit, risking stack overflow
  • Added MAX_AWK_CALL_DEPTH = 64 to limit recursion
  • Loop iteration limits (100K) already existed

Test plan

  • Unit test: test_awk_recursive_function_depth_limit
  • Unit test: test_awk_while_loop_limited

Closes #431

AWK recursive function calls had no depth limit and could cause
stack overflow. Added MAX_AWK_CALL_DEPTH (64) to limit recursion.
Loop iteration limits already existed (100K).

Closes #431
@chaliy chaliy force-pushed the claude/fix-431-Y2nIj branch from 9ebebe1 to b07c8ab Compare March 2, 2026 03:00
@chaliy chaliy merged commit a943566 into main Mar 2, 2026
17 checks passed
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.

[L-7] No iteration limit on AWK loops

2 participants