Opened 6 years ago

Closed 6 years ago

#11618 closed defect (fixed)

There should be no memory leaks in the unit tests

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: tor-relay tests
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When arma ran valgrind on the unit tests the other day, he found over 1100 memory leaks.

21:41 < nickm> actually, the insight I'm getting is tht these are mostly in test
s that other people wrote.
21:41 < nickm> My conclusions are:
21:41 < nickm> 1) Wow, a lot of people have been writing tests!  That's awesome!
21:42 < armadev> :)
21:42 < nickm> 2) I need to add valgrind to my acceptance tests for test patches
; I have apparently been sloppy about seeing leaks in test code.

Child Tickets

Change History (4)

comment:1 Changed 6 years ago by nickm

Owner: set to nickm
Status: newassigned

I've started working on this in branch "valgrind_tests" ; I am down to 29 leaks.

comment:2 Changed 6 years ago by nickm

Status: assignedneeds_review

Branch "valgrind_tests" is ready for review. It has a fix for all of the leaks but #11649, which is an actual bug.

comment:3 Changed 6 years ago by nickm

(There are changes outside of src/test here, but those are just to expose some _free() functions and the like)

comment:4 Changed 6 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged to 0.2.5. The changes to the main codebase seem (on inspection) to be small and correct; the test fixes are bigger, but they still look okay, and we'll soon find out if the tests are broken.

Note: See TracTickets for help on using tickets.