Ticket #8358 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Clear memory leaks in the DataObjectsTest package

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: major Milestone: Release 3.2
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #8362 Tester: Wenduo Zhou

Description (last modified by Russell Taylor) (diff)

The SNS Jenkins has a valgrind job which uses the unit tests as a hook into exercising the Mantid code itself. This of course means that it picks up any leaks in the test code as well.

Using this job and/or valgrind runs of your own, eliminate all the leaks/errors that come out of the test code itself. I've created this as an isolated ticket because I'd like to get a clear view of the errors we have in the actual Mantid code. All changes to this ticket should only be to code in the Framework/DataObjects/test/ directory!

When working on this, don't just add delete calls - consider whether the leaking call really needs to be a heap allocation; create the object on the stack if not.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Blocking 8362 added

comment:2 Changed 7 years ago by Russell Taylor

  • Description modified (diff)

comment:3 Changed 7 years ago by Russell Taylor

  • Owner set to Russell Taylor
  • Milestone changed from Backlog to Release 3.2

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:5 Changed 7 years ago by Russell Taylor

  • Status changed from assigned to inprogress

Re #8358. Clear memory leaks in test.

There's no reason for any of these MaskWorkspace instances to be created on the heap rather than the stack.

Changeset: 074f4563d9823b278c1de1e10a0326da606201d5

comment:6 Changed 6 years ago by Russell Taylor

Re #8358. Clear memory leaks in test.

There's no reason for any of these MaskWorkspace instances to be created on the heap rather than the stack.

Changeset: 2bf5cadf3cfdc8887460cc2533410dab7f746948

comment:7 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate memory leak by creating object on stack.

Changeset: 96f7c0edea935551b5506b5c544cc6998b479594

comment:8 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate a raft of memory leaks in this test.

Changeset: 827f3b623393fbb526d44586a2e8d3db96eee95d

comment:9 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate memory leaks in test.

Changeset: e66891bef9fe251bcf27493398d29a66cb1d8868

comment:10 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate memory leaks in test.

Changeset: e3c2cb4e372553b7bed73e22f06abf16579373cb

comment:11 Changed 6 years ago by Russell Taylor

Re #8358. Remove deletes that have been replicated in another ticket.

#8685 changed this test and handled the delete in an alternative way.

Changeset: 3020e6216efae05c65dfaea505475535fff4f3a8

comment:12 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate a raft of memory leaks in this test.

Changeset: 8b64ff6f49301927124fee59ac28fa389a634388

comment:13 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate memory leaks in test.

Changeset: 1f9e34e0df2e57e1ec215cfd3c8cf65138b78b9e

comment:14 Changed 6 years ago by Russell Taylor

Re #8358. Eliminate memory leaks in test.

Changeset: c48d846278bf423855c039c3d877fdc14f681828

comment:15 Changed 6 years ago by Russell Taylor

Re #8358. Remove deletes that have been replicated in another ticket.

#8685 changed this test and handled the delete in an alternative way.

Changeset: dc9870993067909f40857b92b9c3f9afb0d9f0bc

comment:16 Changed 6 years ago by Russell Taylor

  • Status changed from inprogress to verify
  • Resolution set to fixed

With this work and the removal of managed workspaces in #9357 there are now only 2 leaks showing in the DataObjectsTest valgrind run, neither of which appear to be related to test code and so will be addressed in #8362.

comment:17 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:18 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8358_dataobjects_test_memory_leaks'

Full changeset: 6f0cc734d79ed89900575b05b74046664e8802cf

comment:19 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9203

Note: See TracTickets for help on using tickets.