Ticket #8410 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Change mutex in Task to boost::shared_ptr

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: major Milestone: Release 3.1
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #8359 Tester: Russell Taylor

Description

As there are lots of chances for memory leaks with a nicely public facing raw pointer, change this over.

Change History

comment:1 Changed 7 years ago by Peter Peterson

  • Blocking 8359 added

comment:2 Changed 7 years ago by Peter Peterson

  • Blocked By 8355 removed

comment:3 Changed 7 years ago by Peter Peterson

  • Status changed from new to inprogress

Re #8410. Allow specifying multiple config files on the command line.

Changeset: 62c5ec4849222056b159d9c89cfbc486733cb8a1

comment:4 Changed 7 years ago by Peter Peterson

Miss-tagged the ticket:

"Re #841. Changed the Mutex raw pointer in Task to a boost::shared_ptr"

Changeset: 9d5ea6ea5fea39d15816df2ef7fdffc3287b1681

comment:5 Changed 7 years ago by Peter Peterson

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

This is on feature/8410_task_mutex_shared_ptr.

To test:

  • See that KernelTest still works
  • The valgrind tests on develop should have less leaked memory
  • LoadEventNexus (uses threadpool heavily) should still work

comment:6 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:7 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Leakage has been reduced in ThreadPoolTest & ThreadSchedulerMutexTest. LoadEventNexus(Test) appears unaffected. Performance is also unchanged.

Just a few tidy-ups needed:

  • The preferred way to create a shared_ptr is make_shared, so LoadEventNexus.cpp:1609 should become:
    auto diskIOMutex = boost::make_shared<Mutex>();
    
    There are also places in tests where this should be fixed.
  • Some deletes in tests have been commented out instead of removed.
  • Pedantry: The indentation is wrong at Task.h line 77

comment:8 Changed 7 years ago by Peter Peterson

  • Status changed from reopened to inprogress

Re #8410. Made modifications as suggested by Russell.

Changeset: 222b9e17950ff16dd0b7db2791bd7e9e11db4ce9

comment:9 Changed 7 years ago by Peter Peterson

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

comment:10 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:11 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/8410_task_mutex_shared_ptr'

Full changeset: 8228873ea9a4746e62ab520bce32f224d3c09062

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9255

Note: See TracTickets for help on using tickets.