Ticket #8359 (closed: fixed)
Clear memory leaks in the Kernel package
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | Maintenance |
Cc: | Blocked By: | #8355, #8410, #8489 | |
Blocking: | Tester: | Wenduo Zhou |
Description
The SNS Jenkins has a valgrind job which checks the Kernel code in so far as it is exercised by the unit tests.
Using this job and/or valgrind runs of your own, eliminate all the leaks/errors that result from code in the Kernel package - i.e. under Framework/Kernel/inc/MantidKernel or Framework/Kernel/src.
Note that this should be done after leaks coming out of the test code have been addressed (#8355).
Change History
comment:4 Changed 7 years ago by Russell Taylor
- Owner set to Russell Taylor
- Milestone changed from Backlog to Release 3.2
comment:6 Changed 7 years ago by Russell Taylor
- Status changed from new to inprogress
Re #8359. Eliminate memory leaks in MRUList test.
It is the caller's responsibility to delete objects being dropped from the MRU list, and that wasn't being done here before.
Changeset: ad76bd4825ab7a1e83f7980f94444247a53792de
comment:7 Changed 7 years ago by Russell Taylor
Re #8359. deleteIndex needs to also delete the pointed-to object.
I think. Certainly, this removes a memory leak in the MRUList unit test. I will have to be guided by the other tests (including the system tests) as to whether this is always the right thing to do. The method is only directly used by the EventWorkspaceMRU class.
Changeset: c18128dd021a6d46837dc7369998453788540a12
comment:8 Changed 7 years ago by Russell Taylor
Re #8359. Clean up MRUList for readability.
Use auto to avoid long-winded declarations and remove unneeded local variables and headers.
Changeset: a55e73e7d5a521db3a4d98cf0bfb1ce7653916b5
comment:9 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leaks in ThreadSchedulerMutexesTest.
Changeset: 98023b631ac197419827959243a780dedab7116f
comment:10 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leaks in UnitTest.
Changeset: 163547075462e369c219f43945107edc80e185d0
comment:11 Changed 7 years ago by Russell Taylor
Re #8359. Fix memory leaks in Property unit test.
Changeset: 318140204773c690416287cca6ab1989e65db4b0
comment:12 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leaks in DiskBufferTest.
Changeset: 68db275cbef687362dca8f024c8adbe8d8c6c82c
comment:13 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leaks in LogParserTest.
Changeset: d73e112b2a5e99ac35b39f91f4fc0c86168824c6
comment:14 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leaks in TimeSeriesPropertyTest.
Changeset: f2fa182fb8caca93bd857e60c00a970cd23e10d2
comment:15 Changed 7 years ago by Russell Taylor
Re #8359. Clear memory leak in FilteredTimeSeriesProperty.
The class was incorrectly failing to delete the held TSP in the case that ownership was not transferred, even though it took a clone of the property and held onto that. This change means that the member variable flag indicating ownership is no longer required.
Changeset: d175dceb8d2e78305ead0925e7ac64e9e3815834
comment:16 Changed 7 years ago by Russell Taylor
Re #8359. Fix memory leak in FilteredTimeSeriesPropertyTest.
Changeset: 32ecbc561495043e4fd6dc7f7ce3adf00723fa50
comment:17 Changed 7 years ago by Russell Taylor
Re #8359. Avoid a memory leak when updateFacilities() is called.
It starts by clearing the list of facilities (which contains owned pointers to FacilityInfo objects), but didn't delete the held objects.
Changeset: 56c75e0fce63536197d1060ed60f63678743e477
comment:18 Changed 7 years ago by Russell Taylor
Re #8359. Add suppression of a leak that's actually within Nexus.
It appears nexus gives a nice big leak if you try to open a file that isn't an HDF file. There's nothing we can directly do about that.
Changeset: 31abb342b93b2122225e355c63cacd99d06b8968
comment:19 Changed 7 years ago by Russell Taylor
Re #8359. Add required include.
Changeset: 563a977bced9b87c5d0fd48b7059103238b49528
comment:20 Changed 7 years ago by Russell Taylor
Re #8359. Add another required include.
Someone else wasn't taking care of their own includes...
Changeset: 9e23cabbd024d4f57a8e010cf540b0bacc5634d5
comment:21 Changed 7 years ago by Russell Taylor
Re #8359. Add more required includes.
Changeset: e88e2d57dc74dbe62e83f58178584a5abb93d20c
comment:22 Changed 7 years ago by Russell Taylor
Re #8359. Fix warning-generating typo.
Changeset: a60c168d035728dd75aa97dd3892e2fef90331e0
comment:25 Changed 7 years ago by Russell Taylor
- Status changed from inprogress to verify
- Resolution set to fixed
Tester: Look! No memory leaks in Kernel! https://builds.sns.gov/view/Static%20Analysis/job/ornl_valgrind_develop/valgrindResult/. (Disclaimer: At least not in the code that's hit by unit tests.)
comment:26 Changed 7 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:27 Changed 7 years ago by Wenduo Zhou
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/8359_kernel_memory_leaks'
Full changeset: 7b68dc3e971b614555030d37597b1f638e7b3066
comment:28 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9204