[tor-bugs] #17724 [Tor]: Unreliable rend_cache_purge test
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 30 23:52:36 UTC 2015
#17724: Unreliable rend_cache_purge test
--------------------------------------+------------------------------------
Reporter: cypherpunks | Owner:
Type: defect | Status: needs_review
Priority: Medium | Milestone: Tor: 0.2.8.x-final
Component: Tor | Version: Tor: unspecified
Severity: Minor | Resolution:
Keywords: TorCoreTeam201512, tests | Actual Points:
Parent ID: | Points:
Sponsor: |
--------------------------------------+------------------------------------
Changes (by teor):
* keywords: => TorCoreTeam201512, tests
* status: new => needs_review
* milestone: => Tor: 0.2.8.x-final
Comment:
Replying to [ticket:17724 cypherpunks]:
> The `test_rend_cache_purge` function contains an assertion which
verifies that the internal strmap does not change after a purge
(`src/test/test_rendcache.c:1044` on
0a701e537778ac9da31049f4efebf7cb2bf9c285).
>
> However, the `rend_cache_purge` function frees the internal strmap and
allocates a new one. This turns the assertion in a check whether memory
allocation returns the same address as was just freed. The C11 standard
mentions that a previous call to `free` is synchronized with a call to
`malloc` [0].
> ...
> I am suggesting to remove the assertion because it verifies behavior
that does not affect normal operation and (in my case) interferes with
testing.
Relying on the internals of malloc in unit tests is unhelpful.
Please see my branch bug17724 in https://github.com/teor2345/tor.git
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17724#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list