tor/changes/ticket26008
Nick Mathewson 6e3e96d2ff Fix the selection of events to cancel in test_workqueue.c
Our previous algorithm had a nonzero probability of picking no
events to cancel, which is of course incorrect.  The new code uses
Vitter's good old reservoir sampling "algorithm R" from 1985.

Fixes bug 26008; bugfix on 0.2.6.3-alpha.
2018-05-06 21:03:26 -04:00

8 lines
352 B
Plaintext

o Minor bugfixes (test):
- When testing workqueue event-cancellation, make sure that we actually
cancel an event, and that cancel each event with equal probability.
(It was previously possible, though extremely unlikely, for our
event-canceling test not to cancel any events.) Fixes bug 26008;
bugfix on 0.2.6.3-alpha.