summaryrefslogtreecommitdiff
path: root/changes/ticket26008
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-05-06 21:03:26 -0400
committerNick Mathewson <nickm@torproject.org>2018-05-06 21:03:26 -0400
commit6e3e96d2ff0c1b83bdd3f2059d1b4a2b96a53341 (patch)
treeac68c952544fdbadcf71cdb660e1c9aeb606a601 /changes/ticket26008
parentf36656cada48a2d9f51c857d8477a8060cb89b9d (diff)
downloadtor-6e3e96d2ff0c1b83bdd3f2059d1b4a2b96a53341.tar.gz
tor-6e3e96d2ff0c1b83bdd3f2059d1b4a2b96a53341.zip
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.
Diffstat (limited to 'changes/ticket26008')
-rw-r--r--changes/ticket260087
1 files changed, 7 insertions, 0 deletions
diff --git a/changes/ticket26008 b/changes/ticket26008
new file mode 100644
index 0000000000..7550c959e2
--- /dev/null
+++ b/changes/ticket26008
@@ -0,0 +1,7 @@
+ 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.
+