summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-09-17 14:04:54 -0400
committerNick Mathewson <nickm@torproject.org>2020-09-17 14:04:54 -0400
commit7945e075a42aecaa633565ebbc5d3b809ed24e7e (patch)
tree530c52086c0b53d4bc117449ce53e4b175112554
parent47f1d19f8e6e1795ad7a73cb96bf44f355442e85 (diff)
downloadtor-7945e075a42aecaa633565ebbc5d3b809ed24e7e.tar.gz
tor-7945e075a42aecaa633565ebbc5d3b809ed24e7e.zip
Fix underflow in rend_cache/free_all test.
We already fixed these in #40099 and #40125. This patch fixes #40126. Bugfix on 0.2.8.1-alpha.
-rw-r--r--changes/ticket401264
-rw-r--r--src/test/test_rendcache.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/ticket40126 b/changes/ticket40126
new file mode 100644
index 0000000000..1f5806e6cb
--- /dev/null
+++ b/changes/ticket40126
@@ -0,0 +1,4 @@
+ o Testing (onion service v2):
+ - Fix another rendezvous cache unit test that was triggering an underflow on the
+ global rend cache allocation. Fixes bug 40126; bugfix on
+ 0.2.8.1-alpha.
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index 92e135f3b1..8b0e2df485 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -954,6 +954,7 @@ test_rend_cache_free_all(void *data)
one->parsed = desc_one;
desc_one->timestamp = time(NULL) + TIME_IN_THE_PAST;
desc_one->pk = pk_generate(0);
+ rend_cache_increment_allocation(rend_cache_entry_allocation(one));
strmap_set_lc(rend_cache, "foo1", one);
rend_cache_free_all();