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

Bug27139 034 #334

Merged
merged 4 commits into from Sep 20, 2018

Conversation

Projects
None yet
3 participants
@nmathewson
Contributor

nmathewson commented Sep 14, 2018

No description provided.

nmathewson added some commits Sep 14, 2018

Use a slightly more accurate formula for OSX 32-bit msec conversion
We use an optimized but less accurate formula for converting coarse
time differences to milliseconds on 32-bit OSX platforms, so that we
can avoid 64-bit division.

The old numbers were off by 0.4%.  The new numbers are off by .006%.

This should make the unit tests a bit cleaner, and our tolerances a
bit closer.
Avoid integer overflow on fast 32-bit millisecond conversion.
Multiply-then-divide is more accurate, but it runs into trouble when
our input is above INT32_MAX/numerator.  So when our value is too
large, do divide-then-multiply instead.

Fixes part of bug 27139; bugfix on 0.3.4.1-alpha.
Make circuitmux ewma timing test more tolerant on 32bit osx
Since we use a 32-bit approximation for millisecond conversion here,
we can't expect so much precision.

Fixes part of bug 27139; bugfix on 0.3.4.1-alpha.
@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Sep 14, 2018

Coverage Status

Coverage remained the same at 59.552% when pulling 9a90f4c on nmathewson:bug27139_034 into 3ddfd5f on torproject:maint-0.3.4.

coveralls commented Sep 14, 2018

Coverage Status

Coverage remained the same at 59.552% when pulling 9a90f4c on nmathewson:bug27139_034 into 3ddfd5f on torproject:maint-0.3.4.

@torproject-pusher torproject-pusher merged commit 9a90f4c into torproject:maint-0.3.4 Sep 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment