vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.81k stars 788 forks source link

fix[codegen]: fix false positive in risky call detection #4160

Open charles-cooper opened 2 weeks ago

charles-cooper commented 2 weeks ago

the potential_overlap and read_write_overlap() functions use contains_risky_call to detect if there is potential for reentrancy. however, when the target is a precompile, there is no chance for reentrancy, so we filter them out of the detector.

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

![Put a link to a cute animal picture inside the parenthesis-->]()

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.

Project coverage is 43.85%. Comparing base (4594f8b) to head (48132c9).

Files Patch % Lines
vyper/codegen/ir_node.py 63.63% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4160 +/- ## =========================================== - Coverage 91.34% 43.85% -47.50% =========================================== Files 109 109 Lines 15606 15616 +10 Branches 3432 3434 +2 =========================================== - Hits 14256 6849 -7407 - Misses 920 8251 +7331 - Partials 430 516 +86 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.