Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory length generated by assert_reason #1982

Merged
merged 3 commits into from
May 19, 2020
Merged

Fix memory length generated by assert_reason #1982

merged 3 commits into from
May 19, 2020

Conversation

ZumZoom
Copy link
Contributor

@ZumZoom ZumZoom commented May 18, 2020

Fixes #1981

Description of issue

Code generation for assert_reason generates incorrect length for revert string which leads to issues with revert reason decoding.

How I fixed it

Fixed length of memory passed to revert opcode generated by assert_reason.

How to verify it

Check that assert tests are still passing.

Description for the changelog

Removed 32 bytes of junk at the end of revert reasons.

Cute Animal Picture

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

@iamdefinitelyahuman
Copy link
Contributor

This looks right to me. A followup to my comments in #1981, I think we actually do need the PUSH32 to ensure the memory is zero'd.

@codecov-io
Copy link

codecov-io commented May 18, 2020

Codecov Report

Merging #1982 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1982   +/-   ##
=======================================
  Coverage   87.17%   87.17%           
=======================================
  Files          58       58           
  Lines        6637     6637           
  Branches     1677     1677           
=======================================
  Hits         5786     5786           
  Misses        536      536           
  Partials      315      315           
Impacted Files Coverage Δ
vyper/parser/stmt.py 92.40% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ebce95...f87aaf6. Read the comment docs.

@fubuloubu fubuloubu merged commit 1b2f930 into vyperlang:master May 19, 2020
@ZumZoom ZumZoom deleted the patch-1 branch May 20, 2020 20:11
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.

Error strings are zero-padded to 32 bytes
4 participants