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 bad memory accounting for sds when no malloc_size available #694

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

ranshid
Copy link
Member

@ranshid ranshid commented Jun 25, 2024

Issue Introduced by #453.
When we check the SDS _TYPE_5 allocation size we mistakenly used zmalloc_size which DOES take the PREFIX size into account when no malloc_size support.
Later when we free we add the PREFIX_SIZE again which leads to negative memory accounting on some tests.
Example test failure: https://github.com/valkey-io/valkey/actions/runs/9654170962/job/26627901497

@ranshid ranshid requested a review from madolson June 25, 2024 12:47
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.24%. Comparing base (4d3d6c0) to head (45ed952).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #694      +/-   ##
============================================
+ Coverage     70.21%   70.24%   +0.02%     
============================================
  Files           110      110              
  Lines         60100    60100              
============================================
+ Hits          42202    42215      +13     
+ Misses        17898    17885      -13     
Files Coverage Δ
src/sds.c 85.86% <100.00%> (ø)

... and 9 files with indirect coverage changes

@madolson madolson merged commit 3df9d42 into valkey-io:unstable Jun 25, 2024
19 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.

3 participants