tor/changes/laplace-edge-cases
teor 09cac24373 Handle edge cases in the round_*_to_next_multiple_of functions
Consistently check for overflow in round_*_to_next_multiple_of.

Check all round_*_to_next_multiple_of functions with expected values.
Check all round_*_to_next_multiple_of functions with maximal values.

Related to HS stats in #13192.
2015-05-06 18:05:15 +10:00

12 lines
541 B
Plaintext

o Minor bugfixes:
- Handle edge cases in the laplace functions:
* avoid division by zero
* avoid taking the log of zero
* silence clang type conversion warnings using round and trunc
* consistently check for overflow in round_*_to_next_multiple_of
- Add tests for laplace edge cases:
* check add_laplace_noise with maximal values
* check round_*_to_next_multiple_of with additional values
* check round_*_to_next_multiple_of with maximal values
Related to HS stats in #13192.