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 to bit shift errors #1

Merged
merged 1 commit into from May 27, 2019
Merged

Fix to bit shift errors #1

merged 1 commit into from May 27, 2019

Conversation

ayushr2
Copy link
Contributor

@ayushr2 ayushr2 commented May 24, 2019

As corrected in this PR, at many instances in the code a 32-bit or 16-bit number was being left shifted by 32. The numeric values were too small for that to be a valid shift.

I have just moved the shifts outside of the uint64 cast which should fix this issue.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 17

  • 4 of 5 (80.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 61.03%

Changes Missing Coverage Covered Lines Changed/Added Lines %
block_group_descriptor.go 1 2 50.0%
Totals Coverage Status
Change from base Build 16: 0.0%
Covered Lines: 711
Relevant Lines: 1165

💛 - Coveralls

1 similar comment
@coveralls
Copy link

coveralls commented May 24, 2019

Pull Request Test Coverage Report for Build 17

  • 4 of 5 (80.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 61.03%

Changes Missing Coverage Covered Lines Changed/Added Lines %
block_group_descriptor.go 1 2 50.0%
Totals Coverage Status
Change from base Build 16: 0.0%
Covered Lines: 711
Relevant Lines: 1165

💛 - Coveralls

@dsoprea
Copy link
Owner

dsoprea commented May 25, 2019

Thanks for catching this.

I'd really like one of us to reproduce the issue in a unit-test. Would you be willing to add one, or would you prefer that I do?

@ayushr2
Copy link
Contributor Author

ayushr2 commented May 25, 2019

Thanks for responding! I do not understand ext4 that well yet to unit test this bug.
Please feel free to hop on and add tests if you like. I have added you as a collaborator.

@dsoprea
Copy link
Owner

dsoprea commented May 27, 2019

Did you actually experience the failures, or merely just observe the bugs while looking at the code? If the former, where in the code did it fail for you?

@ayushr2
Copy link
Contributor Author

ayushr2 commented May 27, 2019

I just observed the bugs. Did not actually get it to cause any failure.

@dsoprea
Copy link
Owner

dsoprea commented May 27, 2019 via email

@dsoprea dsoprea merged commit d235270 into dsoprea:master May 27, 2019
@dsoprea
Copy link
Owner

dsoprea commented May 27, 2019

In lieu of the fact that we don't have a failure case that we can write a test for, I'll just merge it. Thanks.

@ayushr2 ayushr2 deleted the bug-fix/bit-shift branch May 28, 2019 16:35
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