Skip to content

Keep else-if storage operations inside their branch - #29642

Merged
mohammadfawaz merged 3 commits into
masterfrom
codex/fix-veria-41-else-if-storage
Oct 2, 2026
Merged

mohammadfawaz merged 3 commits into
masterfrom
codex/fix-veria-41-else-if-storage

Conversation

@mohammadfawaz

@mohammadfawaz mohammadfawaz commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Storage operations in an else if condition could run before the outer branch was evaluated. A skipped condition could therefore pop a storage vector, swap an element, or trigger an out-of-bounds assertion.

Keep the generated statements inside the enclosing else branch. Operations run in source order when the condition is reached and do not run when an earlier branch is taken. The command syntax and project setup stay unchanged.

Addresses VERIA-41:

https://veria.dev/dashboard/findings/b_UvDabyuY-aduAQnOazk

@mohammadfawaz mohammadfawaz self-assigned this Sep 25, 2026
@mohammadfawaz mohammadfawaz added 馃悰 bug Something isn't working 馃П Core Compiler Anything related to the core compiler including parsing, analysis, transforms, codegen, etc. labels Sep 25, 2026

@IGI-111 IGI-111 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

More evidence we should have a mux operator imo

@mohammadfawaz
mohammadfawaz force-pushed the codex/fix-veria-41-else-if-storage branch from 3b4fbf0 to eaa6dcc Compare October 2, 2026 13:41
@mohammadfawaz
mohammadfawaz enabled auto-merge (squash) October 2, 2026 18:26
@mohammadfawaz
mohammadfawaz merged commit 4fd6c71 into master Oct 2, 2026
9 checks passed
@mohammadfawaz
mohammadfawaz deleted the codex/fix-veria-41-else-if-storage branch October 2, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

馃悰 bug Something isn't working 馃П Core Compiler Anything related to the core compiler including parsing, analysis, transforms, codegen, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants