Skip to content

fix[venom]: fix var defined check for unreachable blocks#4518

Merged
charles-cooper merged 43 commits intovyperlang:masterfrom
HodanPlodky:feat/venom/basic-check
Mar 18, 2025
Merged

fix[venom]: fix var defined check for unreachable blocks#4518
charles-cooper merged 43 commits intovyperlang:masterfrom
HodanPlodky:feat/venom/basic-check

Conversation

@HodanPlodky
Copy link
Copy Markdown
Collaborator

@HodanPlodky HodanPlodky commented Mar 13, 2025

What I did

Fixed error that was triggered with unreachable basic block in var definition analysis

How I did it

Run analysis on all basic block not just unreachable and fix a lattice

How to verify it

Added test for this case

Commit message

Fixed an error with `venom_check_ctx` that was triggered with
unreachable basic blocks in the variable definition check (since
unreachable blocks were not visited in the `VarDefinition` analysis).

This commit fixes two root issues: it runs the analysis on all basic
blocks, not just the unreachable ones. It also fixes the lattice
initialization so that it converges correctly no matter the traversal
order.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.26%. Comparing base (fc2473c) to head (a7d6737).
Report is 82 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4518   +/-   ##
=======================================
  Coverage   92.26%   92.26%           
=======================================
  Files         123      123           
  Lines       17502    17505    +3     
  Branches     2960     2961    +1     
=======================================
+ Hits        16148    16151    +3     
  Misses        946      946           
  Partials      408      408           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-cooper
Copy link
Copy Markdown
Member

@HodanPlodky could you rebase off master?

@charles-cooper charles-cooper changed the title fix[venom]: basic check fix[venom]: fix var defined check for unreachable blocks Mar 18, 2025
@charles-cooper charles-cooper enabled auto-merge (squash) March 18, 2025 15:28
@charles-cooper charles-cooper merged commit 64717bd into vyperlang:master Mar 18, 2025
158 of 159 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.

2 participants