Skip to content

compiler: fail closed past sandbox stack capacity - #3454

Open
adilalperenciftci wants to merge 1 commit into
aether-lang-dev:mainfrom
adilalperenciftci:fix/sandbox-depth-overflow
Open

adilalperenciftci wants to merge 1 commit into
aether-lang-dev:mainfrom
adilalperenciftci:fix/sandbox-depth-overflow

Conversation

@adilalperenciftci

Copy link
Copy Markdown
Contributor

Summary

I reproduced a 65th sandbox.enforce block running without its grant list because the generated permission stack silently discarded pushes beyond its 64 physical slots. An inner empty grant list therefore inherited only the less restrictive outer grants.

  • Continue tracking logical sandbox depth beyond the physical stack capacity.
  • Refuse and audit every check while logical depth exceeds 64.
  • Preserve matching pop and panic/unwind restoration.
  • Treat a trusted-call barrier that cannot fit as fail-closed.
  • Add an end-to-end 65-level regression and verify the outer state is restored.

Verification

  • BEFORE: overflow-visible=1
  • AFTER: overflow-visible=0
  • Post-pop restoration: after-visible=1
  • std.sandbox: 14 passing
  • Trusted-call suite: 10 passing
  • Trusted-name integration: 9 passed, 0 failed
  • make check-changelog
  • make check-tests
  • make test: 634 passed, 0 failed

Signed-off-by: Adil Alperen Çiftci adilalperenciftci@users.noreply.github.com

I reproduced a 65th sandbox block running without its grant list because the generated 64-slot stack silently discarded the push. Track logical depth past the physical capacity and refuse checks until matching pops or unwind restoration returns to a stored level.

Cover the denied inner operation and the restored outer state with an end-to-end regression.

Signed-off-by: Adil Alperen Çiftci <adilalperenciftci@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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