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 Partition() w/ size greater than the length of the input #529

Conversation

LebedevRI
Copy link
Contributor

complete() only worked correctly if at least a single full partition
has been produced already, otherwise the buf would be smaller
than the xform(rf).size, and we get buffer overflow, etc.

I've added sufficient test coverage for the issue, that now passes.

I have stumbled into this while trying to write a reduction tree,
not sure if this is something that might be interesting here?

Fixes #528

@codecov
Copy link

codecov bot commented Jun 23, 2022

Codecov Report

Merging #529 (2bf2e55) into master (c8fa4f2) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
+ Coverage   95.33%   95.43%   +0.09%     
==========================================
  Files          32       32              
  Lines        2230     2232       +2     
==========================================
+ Hits         2126     2130       +4     
+ Misses        104      102       -2     
Flag Coverage Δ
Pkg.test 94.55% <100.00%> (+0.09%) ⬆️
Run.test 95.20% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/library.jl 98.44% <100.00%> (+<0.01%) ⬆️
src/nondeterministic_threading.jl 90.81% <0.00%> (+2.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@MasonProtter MasonProtter left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Bump @tkf

@MasonProtter
Copy link
Member

Hey @LebedevRI I’ve finally got the test suite working. Could you rebase on Master? That should get all tests passing and then I can merge.

`complete()` only worked correctly if at least a single full partition
has been produced already, otherwise the `buf` would be smaller
than the `xform(rf).size`, and we get buffer overflow, etc.

I've added sufficient test coverage for the issue, that now passes.

I have stumbled into this while trying to write a reduction tree,
not sure if this is something that might be interesting here?

Fixes JuliaFolds#528
@LebedevRI LebedevRI force-pushed the fix-Partition-for-less-than-one-output branch from 6245a2a to 2bf2e55 Compare November 25, 2022 19:06
@LebedevRI
Copy link
Contributor Author

I've rebased, but did nothing other than that. I don't know if this still works, or needs further changes.

@MasonProtter
Copy link
Member

Great, thanks @LebedevRI!

@MasonProtter MasonProtter merged commit 477d8af into JuliaFolds:master Nov 25, 2022
@LebedevRI
Copy link
Contributor Author

Thank you!

@LebedevRI LebedevRI deleted the fix-Partition-for-less-than-one-output branch November 25, 2022 23:09
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.

Partition() w/ size greater than the length of the input does not work
2 participants