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: Var size when using new type objects #2321

Merged
merged 2 commits into from Feb 22, 2021

Conversation

iamdefinitelyahuman
Copy link
Contributor

What I did

In VariableRecord, return the correct size when the related type object is one of the new context types.

This fixes an issue with memory corruption caused by excessive deallocation when releasing internal variables :(

Cute Animal Picture

image

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Add a test case that shows the incorrect behavior is caught

vyper/signatures/function_signature.py Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #2321 (ac651a3) into master (418c85b) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2321      +/-   ##
==========================================
- Coverage   85.84%   85.77%   -0.07%     
==========================================
  Files          85       85              
  Lines        8582     8583       +1     
  Branches     2054     2054              
==========================================
- Hits         7367     7362       -5     
- Misses        732      738       +6     
  Partials      483      483              
Impacted Files Coverage Δ
vyper/signatures/function_signature.py 87.69% <100.00%> (+0.09%) ⬆️
vyper/parser/memory_allocator.py 67.74% <0.00%> (-9.68%) ⬇️

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 418c85b...ac651a3. Read the comment docs.

@fubuloubu fubuloubu merged commit e00c0f6 into vyperlang:master Feb 22, 2021
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-mem-dealloc branch April 20, 2021 18:49
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.

None yet

3 participants