Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#29599 closed defect (fixed)

Test failure due to missing sr_state_free[_all]() in shared-random unit tests

Reported by: teor Owned by: teor
Priority: Very High Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor: 0.2.9.1-alpha
Severity: Major Keywords: tor-ci, tor-test, memory-leak, external-change, 029-backport, 033-backport, 034-backport, 035-backport, 040-backport, nickm-merge
Cc: Actual Points:
Parent ID: Points: 0.5
Reviewer: dgoulet Sponsor:

Description

It looks like Travis recently upgraded to a clang with a (better) LeakSanitizer.

The following tests have memory leaks:

  • shared-random/vote
  • shared-random/sr_compute_srv
  • shared-random/state_transition

They are missing a call to sr_state_free() in 0.2.9 and later.
But it's spelt sr_state_free_all() in 0.3.3 and later.

Child Tickets

Change History (6)

comment:1 Changed 5 months ago by teor

Status: assignedneeds_review

Here is one of the failed CIs with memory leak logs:
https://travis-ci.org/tlyu/tor/jobs/499009440#L4956

Here are the pull requests for review:

0.2.9 pull request:
https://github.com/torproject/tor/pull/730

0.3.3 pull request (function name change):
https://github.com/torproject/tor/pull/731

I also did a merge to master to test that there aren't any memory leaks in other tests:

master pull request: (CI only - no changes from 0.3.3)
https://github.com/torproject/tor/pull/732

comment:2 Changed 5 months ago by dgoulet

Keywords: nickm-merge added
Reviewer: dgoulet
Status: needs_reviewmerge_ready

lgtm;

comment:3 Changed 5 months ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.3.5.x-final

Merged to 0.4.0 and forward; marking for backport.

comment:4 Changed 5 months ago by teor

The 64-bit Windows Server 2016 builds failed in appveyor due to #29500.

comment:5 Changed 5 months ago by teor

Milestone: Tor: 0.3.5.x-finalTor: 0.2.9.x-final
Resolution: fixed
Status: merge_readyclosed

These builds worked in 0.4.0 and master, so I merged pr/730 to 0.2.9 and later, and pr/731 to 0.3.3 and later.

(I accidentally pushed in-between, so there may be some temporary build failures on 0.3.3, 0.3.4, and 0.3.5.)

comment:6 Changed 5 months ago by asn

LGTM!

Note: See TracTickets for help on using tickets.