MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
This was found using Address Sanitizer on the dev branch. The Processor class defined in sh2peaks.cpp allocated its precomputer member variable on the heap using a raw pointer. The allocated memory was never freed, leading to a memory leak. The fix allocates the memory using a shared_ptr (unique_ptr wasn't used as we need our functors to be copyable for multithreaded purposes).
This was found using Address Sanitizer on the dev branch. The
Processor
class defined insh2peaks.cpp
allocated itsprecomputer
member variable on the heap using a raw pointer. The allocated memory was never freed, leading to a memory leak. The fix allocates the memory using ashared_ptr
(unique_ptr
wasn't used as we need our functors to be copyable for multithreaded purposes).