MRtrix3 / mrtrix3

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
http://www.mrtrix.org
Mozilla Public License 2.0
295 stars 182 forks source link

Sanitiser flagged issues on dev #2772

Closed Lestropie closed 6 months ago

Lestropie commented 10 months ago

Mentioned in #2763; likely also the source of identification of other PRs already created (ideally create & curate a list here).

Utilise the various sanitiser functionalities afforded by recent software structural changes, and address any potential issues on dev. A list of remaining outstanding issues could be posted here, potentially attracting suggestions / instructions from other devs even if they have not yet gone to the effort of setting up the sanitiser checks on their own local systems.

Lestropie commented 10 months ago

Address sanitiser

2775:

212/488 Test 212: bin_mrconvert_11 ..................***Failed 0.16 sec ``` mrconvert: [WARNING] invalid voxel sizes - resetting to sane defaults mrconvert: [100%] copying from "mrconvert/in.mif" to "tmp-[].png" ================================================================= ==319209==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1200 byte(s) in 1 object(s) allocated from: #0 0x55f88c2e377d in operator new[](unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrconvert+0xf677d) (BuildId: 66cfbaa201ccc10f3bb45960480205b1cc43938a) #1 0x7f6adbb8b15f in MR::ImageIO::PNG::load(MR::Header const&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/png.cpp:31:22 #2 0x7f6adbb7eb32 in MR::ImageIO::Base::open(MR::Header const&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/base.cpp:33:3 #3 0x55f88c3b6c9f in MR::Image::Buffer::Buffer(MR::Header&, bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:295:7 #4 0x55f88c3aec28 in MR::Image MR::Header::get_image(bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:322:11 #5 0x55f88c3af331 in MR::Image::create(std::__cxx11::basic_string, std::allocator > const&, MR::Header const&, bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:197:80 #6 0x55f88c3af331 in void copy_permute >(MR::Image const&, MR::Header&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:314:14 #7 0x55f88c397304 in void extract(MR::Header&, MR::Header&, MR::vector, 0> const&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:328:5 #8 0x55f88c2fd39a in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:486:9 #9 0x55f88c2e60ab in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #10 0x7f6ada629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 Direct leak of 160 byte(s) in 5 object(s) allocated from: #0 0x55f88c2e377d in operator new[](unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrconvert+0xf677d) (BuildId: 66cfbaa201ccc10f3bb45960480205b1cc43938a) #1 0x7f6adba39040 in MR::File::PNG::Writer::save(unsigned char*)::$_0::operator()(unsigned char*) const /home/unimelb.edu.au/robertes/src/sanitisers/core/file/png.cpp:287:31 #2 0x7f6adba39040 in MR::File::PNG::Writer::save(unsigned char*) /home/unimelb.edu.au/robertes/src/sanitisers/core/file/png.cpp:313:5 #3 0x7f6adbb8f3e4 in MR::ImageIO::PNG::unload(MR::Header const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/png.cpp:68:13 #4 0x7f6adbb7f13a in MR::ImageIO::Base::close(MR::Header const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/base.cpp:41:3 #5 0x55f88c3925ba in MR::Header::~Header() /home/unimelb.edu.au/robertes/src/sanitisers/core/header.h:188:13 #6 0x55f88c3b9e41 in MR::Image::Buffer::~Buffer() /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:39:9 #7 0x55f88c3b9e41 in std::_Sp_counted_ptr::Buffer*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:428:9 #8 0x55f88c3b4c8d in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:346:8 #9 0x55f88c3b4c8d in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:1071:11 #10 0x55f88c3b4c8d in std::__shared_ptr::Buffer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:1524:31 #11 0x55f88c3b4c8d in MR::Image::~Image() /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:354:1 #12 0x55f88c3af4de in void copy_permute >(MR::Image const&, MR::Header&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:319:1 #13 0x55f88c397304 in void extract(MR::Header&, MR::Header&, MR::vector, 0> const&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:328:5 #14 0x55f88c2fd39a in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:486:9 #15 0x55f88c2e60ab in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #16 0x7f6ada629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 SUMMARY: AddressSanitizer: 1360 byte(s) leaked in 6 allocation(s). Start 213: bin_mrconvert_12 213/488 Test #213: bin_mrconvert_12 ..................***Failed 0.15 sec ```
213/488 Test 213: bin_mrconvert_12 ..................***Failed 0.15 sec ``` mrconvert: [WARNING] existing output files will be overwritten [?7l mrconvert: [100%] copying from "unit_warp.mif" to "tmp-[].png"...[?7h mrconvert: [100%] copying from "unit_warp.mif" to "tmp-[].png" ================================================================= ==531839==ERROR: LeakSanitizer: detected memory leaks Direct leak of 576 byte(s) in 9 object(s) allocated from: #0 0x55b387fdb77d in operator new[](unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrconvert+0xf677d) (BuildId: 66cfbaa201ccc10f3bb45960480205b1cc43938a) #1 0x7eff83a38cbb in MR::File::PNG::Writer::save(unsigned char*)::$_0::operator()(unsigned char*) const /home/unimelb.edu.au/robertes/src/sanitisers/core/file/png.cpp:287:31 #2 0x7eff83a38cbb in MR::File::PNG::Writer::save(unsigned char*) /home/unimelb.edu.au/robertes/src/sanitisers/core/file/png.cpp:295:5 #3 0x7eff83b8f3e4 in MR::ImageIO::PNG::unload(MR::Header const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/png.cpp:68:13 #4 0x7eff83b7f13a in MR::ImageIO::Base::close(MR::Header const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/base.cpp:41:3 #5 0x55b38808a5ba in MR::Header::~Header() /home/unimelb.edu.au/robertes/src/sanitisers/core/header.h:188:13 #6 0x55b3880e5e11 in MR::Image::Buffer::~Buffer() /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:39:9 #7 0x55b3880e5e11 in std::_Sp_counted_ptr::Buffer*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:428:9 #8 0x55b3880e0cdd in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:346:8 #9 0x55b3880e0cdd in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:1071:11 #10 0x55b3880e0cdd in std::__shared_ptr::Buffer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:1524:31 #11 0x55b3880e0cdd in MR::Image::~Image() /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:354:1 #12 0x55b3880db52e in void copy_permute >(MR::Image const&, MR::Header&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:319:1 #13 0x55b38808f754 in void extract(MR::Header&, MR::Header&, MR::vector, 0> const&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:328:5 #14 0x55b387ff52c9 in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:488:9 #15 0x55b387fde0ab in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #16 0x7eff82629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 Indirect leak of 11664 byte(s) in 1 object(s) allocated from: #0 0x55b387fdb77d in operator new[](unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrconvert+0xf677d) (BuildId: 66cfbaa201ccc10f3bb45960480205b1cc43938a) #1 0x7eff83b8b15f in MR::ImageIO::PNG::load(MR::Header const&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/png.cpp:31:22 #2 0x7eff83b7eb32 in MR::ImageIO::Base::open(MR::Header const&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_io/base.cpp:33:3 #3 0x55b3880e2cef in MR::Image::Buffer::Buffer(MR::Header&, bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:295:7 #4 0x55b3880dac78 in MR::Image MR::Header::get_image(bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:322:11 #5 0x55b3880db381 in MR::Image::create(std::__cxx11::basic_string, std::allocator > const&, MR::Header const&, bool) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:197:80 #6 0x55b3880db381 in void copy_permute >(MR::Image const&, MR::Header&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:314:14 #7 0x55b38808f754 in void extract(MR::Header&, MR::Header&, MR::vector, 0> const&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:328:5 #8 0x55b387ff52c9 in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrconvert.cpp:488:9 #9 0x55b387fde0ab in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #10 0x7eff82629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 SUMMARY: AddressSanitizer: 12240 byte(s) leaked in 10 allocation(s). ```

2761:

222/488 Test 222: bin_mrdegibbs .....................***Failed 0.34 sec ``` mrdegibbs: [done] uncompressing image "b0.nii.gz" [?7l mrdegibbs: [100%] performing 2D Gibbs ringing removal...[?7h mrdegibbs: [100%] performing 2D Gibbs ringing removal ================================================================= ==532129==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2016 byte(s) in 84 object(s) allocated from: #0 0x55cc8d568fc2 in __interceptor_memalign (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrdegibbs+0xaefc2) (BuildId: 3ccc8ee98876f6ccf00a9f750b66f01606423ef1) #1 0x7f7036023458 in fftw_malloc_plain (/lib/x86_64-linux-gnu/libfftw3.so.3+0x23458) (BuildId: 540833d2131547e65736d186bbe599fec123ccd4) Indirect leak of 118776 byte(s) in 1113 object(s) allocated from: #0 0x55cc8d568fc2 in __interceptor_memalign (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrdegibbs+0xaefc2) (BuildId: 3ccc8ee98876f6ccf00a9f750b66f01606423ef1) #1 0x7f7036023458 in fftw_malloc_plain (/lib/x86_64-linux-gnu/libfftw3.so.3+0x23458) (BuildId: 540833d2131547e65736d186bbe599fec123ccd4) SUMMARY: AddressSanitizer: 120792 byte(s) leaked in 1197 allocation(s). testing_diff_image: [ERROR] no filename supplied to standard input (broken pipe?) testing_diff_image: [ERROR] error opening image "-" ```

2781 / #2784:

271/488 Test 271: bin_mrmath_4 ......................***Failed 0.43 sec ``` [?7l mrconvert: [ 18%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 22%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 23%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 24%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 25%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 26%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 29%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 30%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 32%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 33%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 34%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 35%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 48%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 55%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 60%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 63%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 65%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 67%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 69%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 71%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 72%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 74%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 76%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 89%] copying from "dwi.mif" to "tmp-[].mif"...[?7h[?7l mrconvert: [ 92%] copying from "dwi.mif" to "tmp-[].mif"...[?7h mrconvert: [100%] copying from "dwi.mif" to "tmp-[].mif" [?7l mrmath: [ 1%] computing median across 68 images...[?7h[?7l mrmath: [ 3%] computing median across 68 images...[?7h[?7l mrmath: [ 4%] computing median across 68 images...[?7h[?7l mrmath: [ 6%] computing median across 68 images...[?7h[?7l mrmath: [ 7%] computing median across 68 images...[?7h[?7l mrmath: [ 9%] computing median across 68 images...[?7h[?7l mrmath: [ 10%] computing median across 68 images...[?7h[?7l mrmath: [ 12%] computing median across 68 images...[?7h[?7l mrmath: [ 13%] computing median across 68 images...[?7h[?7l mrmath: [ 15%] computing median across 68 images...[?7h[?7l mrmath: [ 16%] computing median across 68 images...[?7h[?7l mrmath: [ 18%] computing median across 68 images...[?7h[?7l mrmath: [ 19%] computing median across 68 images...[?7h[?7l mrmath: [ 21%] computing median across 68 images...[?7h[?7l mrmath: [ 22%] computing median across 68 images...[?7h[?7l mrmath: [ 24%] computing median across 68 images...[?7h[?7l mrmath: [ 25%] computing median across 68 images...[?7h[?7l mrmath: [ 26%] computing median across 68 images...[?7h[?7l mrmath: [ 28%] computing median across 68 images...[?7h[?7l mrmath: [ 29%] computing median across 68 images...[?7h[?7l mrmath: [ 31%] computing median across 68 images...[?7h[?7l mrmath: [ 32%] computing median across 68 images...[?7h[?7l mrmath: [ 34%] computing median across 68 images...[?7h[?7l mrmath: [ 35%] computing median across 68 images...[?7h[?7l mrmath: [ 37%] computing median across 68 images...[?7h[?7l mrmath: [ 38%] computing median across 68 images...[?7h[?7l mrmath: [ 40%] computing median across 68 images...[?7h[?7l mrmath: [ 41%] computing median across 68 images...[?7h[?7l mrmath: [ 43%] computing median across 68 images...[?7h[?7l mrmath: [ 44%] computing median across 68 images...[?7h[?7l mrmath: [ 46%] computing median across 68 images...[?7h[?7l mrmath: [ 47%] computing median across 68 images...[?7h[?7l mrmath: [ 49%] computing median across 68 images...[?7h[?7l mrmath: [ 50%] computing median across 68 images...[?7h[?7l mrmath: [ 51%] computing median across 68 images...[?7h[?7l mrmath: [ 53%] computing median across 68 images...[?7h[?7l mrmath: [ 54%] computing median across 68 images...[?7h[?7l mrmath: [ 56%] computing median across 68 images...[?7h[?7l mrmath: [ 57%] computing median across 68 images...[?7h[?7l mrmath: [ 59%] computing median across 68 images...[?7h[?7l mrmath: [ 60%] computing median across 68 images...[?7h[?7l mrmath: [ 62%] computing median across 68 images...[?7h[?7l mrmath: [ 63%] computing median across 68 images...[?7h[?7l mrmath: [ 65%] computing median across 68 images...[?7h[?7l mrmath: [ 66%] computing median across 68 images...[?7h[?7l mrmath: [ 68%] computing median across 68 images...[?7h[?7l mrmath: [ 69%] computing median across 68 images...[?7h[?7l mrmath: [ 71%] computing median across 68 images...[?7h[?7l mrmath: [ 72%] computing median across 68 images...[?7h[?7l mrmath: [ 74%] computing median across 68 images...[?7h[?7l mrmath: [ 75%] computing median across 68 images...[?7h[?7l mrmath: [ 76%] computing median across 68 images...[?7h[?7l mrmath: [ 78%] computing median across 68 images...[?7h[?7l mrmath: [ 79%] computing median across 68 images...[?7h[?7l mrmath: [ 81%] computing median across 68 images...[?7h[?7l mrmath: [ 82%] computing median across 68 images...[?7h[?7l mrmath: [ 84%] computing median across 68 images...[?7h[?7l mrmath: [ 85%] computing median across 68 images...[?7h[?7l mrmath: [ 87%] computing median across 68 images...[?7h[?7l mrmath: [ 88%] computing median across 68 images...[?7h[?7l mrmath: [ 90%] computing median across 68 images...[?7h[?7l mrmath: [ 91%] computing median across 68 images...[?7h[?7l mrmath: [ 93%] computing median across 68 images...[?7h[?7l mrmath: [ 94%] computing median across 68 images...[?7h[?7l mrmath: [ 96%] computing median across 68 images...[?7h[?7l mrmath: [ 97%] computing median across 68 images...[?7h[?7l mrmath: [ 99%] computing median across 68 images...[?7h[?7l mrmath: [100%] computing median across 68 images...[?7h mrmath: [100%] computing median across 68 images ================================================================= ==551625==ERROR: LeakSanitizer: detected memory leaks Direct leak of 117504 byte(s) in 432 object(s) allocated from: #0 0x562e62c9f53d in operator new(unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/mrmath+0x10a53d) (BuildId: aa05a8086f8f86218381a5bdc54f750b9493ba21) #1 0x562e62ef0eab in std::__new_allocator::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/new_allocator.h:137:27 #2 0x562e62ef0eab in std::allocator_traits >::allocate(std::allocator&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:464:20 #3 0x562e62ef0eab in std::_Vector_base >::_M_allocate(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:378:20 #4 0x562e62ef0eab in float* std::vector >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator > > >(unsigned long, __gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:1614:29 #5 0x562e62ef0eab in std::vector >::operator=(std::vector > const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:232:24 #6 0x562e62ef2b4e in MR::vector::operator=(MR::vector const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/types.h:183:7 #7 0x562e62ef2b4e in Median::operator=(Median const&) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrmath.cpp:114:7 #8 0x562e62ef2b4e in void MR::Raw::store_native(Median, void*, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/raw.h:183:26 #9 0x562e62ef2b4e in MR::Image::set_value(Median) /home/unimelb.edu.au/robertes/src/sanitisers/core/image.h:93:7 #10 0x562e62ef2b4e in MR::Helper::Value >::set(Median) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_helpers.h:515:11 #11 0x562e62ef2b4e in MR::Helper::Value >::operator=(Median) /home/unimelb.edu.au/robertes/src/sanitisers/core/image_helpers.h:498:64 #12 0x562e62ef2b4e in void ImageKernel::ProcessFunctor::operator(), MR::Image >(MR::Image&, MR::Image&) const /home/unimelb.edu.au/robertes/src/sanitisers/cmd/mrmath.cpp:289:19 #13 0x562e62d675ef in decltype(std::forward::ProcessFunctor&>(fp)(std::forward&>(fp1), std::forward&>(fp1))) MR::(anonymous namespace)::Unpack<0ul>::unpack::ProcessFunctor&, std::tuple, MR::Image >&, MR::Image&, MR::Image&>(ImageKernel::ProcessFunctor&, std::tuple, MR::Image >&, MR::Image&, MR::Image&) /home/unimelb.edu.au/robertes/src/sanitisers/core/apply.h:53:12 #14 0x562e62d675ef in decltype(Unpack<(1ul) - (1)>::unpack(std::forward::ProcessFunctor&>(fp), std::forward, MR::Image >&>(fp0), std::get<(1ul) - (1)>(std::forward, MR::Image >&>(fp0)), std::forward&>(fp1))) MR::(anonymous namespace)::Unpack<1ul>::unpack::ProcessFunctor&, std::tuple, MR::Image >&, MR::Image&>(ImageKernel::ProcessFunctor&, std::tuple, MR::Image >&, MR::Image&) /home/unimelb.edu.au/robertes/src/sanitisers/core/apply.h:45:12 #15 0x562e62d675ef in decltype(Unpack<(2ul) - (1)>::unpack(std::forward::ProcessFunctor&>(fp), std::forward, MR::Image >&>(fp0), std::get<(2ul) - (1)>(std::forward, MR::Image >&>(fp0)))) MR::(anonymous namespace)::Unpack<2ul>::unpack::ProcessFunctor&, std::tuple, MR::Image >&>(ImageKernel::ProcessFunctor&, std::tuple, MR::Image >&) /home/unimelb.edu.au/robertes/src/sanitisers/core/apply.h:45:12 #16 0x562e62d675ef in decltype(Unpack, MR::Image >&>::type>::value>::unpack(std::forward::ProcessFunctor&>(fp), std::forward, MR::Image >&>(fp0))) MR::unpack::ProcessFunctor&, std::tuple, MR::Image >&>(ImageKernel::ProcessFunctor&, std::tuple, MR::Image >&) /home/unimelb.edu.au/robertes/src/sanitisers/core/apply.h:70:10 #17 0x562e62d675ef in MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >::operator()(MR::Iterator const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/algo/threaded_loop.h:277:7 #18 0x562e62d6a553 in void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::execute() /home/unimelb.edu.au/robertes/src/sanitisers/core/algo/threaded_loop.h:342:11 #19 0x562e62d6b57e in MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >& std::__invoke_impl::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*>(std::__invoke_memfun_deref, void (void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*&&)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #20 0x562e62d6b57e in std::__invoke_result::ProcessFunctor, MR::Image, MR::Image >&, void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*>::type std::__invoke::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&, void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #21 0x562e62d6b57e in void std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 #22 0x562e62d6b57e in std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 #23 0x562e62d6b57e in std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1430:6 #24 0x562e62d6b57e in MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >& std::__invoke_impl, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 #25 0x562e62d6b57e in std::enable_if::ProcessFunctor, MR::Image, MR::Image >&, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>&>, MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&>::type std::__invoke_r, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>&>(std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:114:9 #26 0x562e62d6b57e in std::_Function_handler (), std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread::*)(), void MR::(anonymous namespace)::ThreadedLoopRunOuter::run_outer::ProcessFunctor, MR::Image, MR::Image >&>(MR::(anonymous namespace)::ThreadedLoopRunInner<2, ImageKernel::ProcessFunctor, MR::Image, MR::Image >&)::PerThread*> >, void> >::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 #27 0x562e62eac78e in std::function ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 #28 0x562e62eac78e in std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:587:27 #29 0x562e62eac9fb in void std::__invoke_impl ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #30 0x562e62eac9fb in std::__invoke_result ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>::type std::__invoke ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #31 0x562e62eac9fb in void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:852:4 #32 0x562e62eac9fb in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:21 #33 0x562e62eac9fb in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:16 #34 0x7f1880a99ee7 in __pthread_once_slow nptl/./nptl/pthread_once.c:116:7 SUMMARY: AddressSanitizer: 117504 byte(s) leaked in 432 allocation(s). testing_diff_image: [ERROR] no filename supplied to standard input (broken pipe?) testing_diff_image: [ERROR] error opening image "-" ```

2760:

337/488 Test 337: bin_sh2peaks_2 ....................***Failed 0.14 sec ``` [?7l sh2peaks: [ 0%] estimating peak directions...[?7h[?7l sh2peaks: [ 1%] estimating peak directions...[?7h[?7l sh2peaks: [ 2%] estimating peak directions...[?7h[?7l sh2peaks: [ 3%] estimating peak directions...[?7h[?7l sh2peaks: [ 4%] estimating peak directions...[?7h[?7l sh2peaks: [ 5%] estimating peak directions...[?7h[?7l sh2peaks: [ 6%] estimating peak directions...[?7h[?7l sh2peaks: [ 7%] estimating peak directions...[?7h[?7l sh2peaks: [ 8%] estimating peak directions...[?7h[?7l sh2peaks: [ 9%] estimating peak directions...[?7h[?7l sh2peaks: [ 10%] estimating peak directions...[?7h[?7l sh2peaks: [ 11%] estimating peak directions...[?7h[?7l sh2peaks: [ 12%] estimating peak directions...[?7h[?7l sh2peaks: [ 13%] estimating peak directions...[?7h[?7l sh2peaks: [ 14%] estimating peak directions...[?7h[?7l sh2peaks: [ 15%] estimating peak directions...[?7h[?7l sh2peaks: [ 16%] estimating peak directions...[?7h[?7l sh2peaks: [ 17%] estimating peak directions...[?7h[?7l sh2peaks: [ 18%] estimating peak directions...[?7h[?7l sh2peaks: [ 19%] estimating peak directions...[?7h[?7l sh2peaks: [ 20%] estimating peak directions...[?7h[?7l sh2peaks: [ 21%] estimating peak directions...[?7h[?7l sh2peaks: [ 22%] estimating peak directions...[?7h[?7l sh2peaks: [ 23%] estimating peak directions...[?7h[?7l sh2peaks: [ 24%] estimating peak directions...[?7h[?7l sh2peaks: [ 25%] estimating peak directions...[?7h[?7l sh2peaks: [ 26%] estimating peak directions...[?7h[?7l sh2peaks: [ 27%] estimating peak directions...[?7h[?7l sh2peaks: [ 28%] estimating peak directions...[?7h[?7l sh2peaks: [ 29%] estimating peak directions...[?7h[?7l sh2peaks: [ 30%] estimating peak directions...[?7h[?7l sh2peaks: [ 31%] estimating peak directions...[?7h[?7l sh2peaks: [ 32%] estimating peak directions...[?7h[?7l sh2peaks: [ 33%] estimating peak directions...[?7h[?7l sh2peaks: [ 34%] estimating peak directions...[?7h[?7l sh2peaks: [ 35%] estimating peak directions...[?7h[?7l sh2peaks: [ 36%] estimating peak directions...[?7h[?7l sh2peaks: [ 37%] estimating peak directions...[?7h[?7l sh2peaks: [ 38%] estimating peak directions...[?7h[?7l sh2peaks: [ 39%] estimating peak directions...[?7h[?7l sh2peaks: [ 40%] estimating peak directions...[?7h[?7l sh2peaks: [ 41%] estimating peak directions...[?7h[?7l sh2peaks: [ 42%] estimating peak directions...[?7h[?7l sh2peaks: [ 43%] estimating peak directions...[?7h[?7l sh2peaks: [ 44%] estimating peak directions...[?7h[?7l sh2peaks: [ 45%] estimating peak directions...[?7h[?7l sh2peaks: [ 46%] estimating peak directions...[?7h[?7l sh2peaks: [ 47%] estimating peak directions...[?7h[?7l sh2peaks: [ 48%] estimating peak directions...[?7h[?7l sh2peaks: [ 49%] estimating peak directions...[?7h[?7l sh2peaks: [ 50%] estimating peak directions...[?7h[?7l sh2peaks: [ 51%] estimating peak directions...[?7h[?7l sh2peaks: [ 52%] estimating peak directions...[?7h[?7l sh2peaks: [ 53%] estimating peak directions...[?7h[?7l sh2peaks: [ 54%] estimating peak directions...[?7h[?7l sh2peaks: [ 55%] estimating peak directions...[?7h[?7l sh2peaks: [ 56%] estimating peak directions...[?7h[?7l sh2peaks: [ 57%] estimating peak directions...[?7h[?7l sh2peaks: [ 58%] estimating peak directions...[?7h[?7l sh2peaks: [ 59%] estimating peak directions...[?7h[?7l sh2peaks: [ 60%] estimating peak directions...[?7h[?7l sh2peaks: [ 61%] estimating peak directions...[?7h[?7l sh2peaks: [ 62%] estimating peak directions...[?7h[?7l sh2peaks: [ 63%] estimating peak directions...[?7h[?7l sh2peaks: [ 64%] estimating peak directions...[?7h[?7l sh2peaks: [ 65%] estimating peak directions...[?7h[?7l sh2peaks: [ 66%] estimating peak directions...[?7h[?7l sh2peaks: [ 67%] estimating peak directions...[?7h[?7l sh2peaks: [ 68%] estimating peak directions...[?7h[?7l sh2peaks: [ 69%] estimating peak directions...[?7h[?7l sh2peaks: [ 70%] estimating peak directions...[?7h[?7l sh2peaks: [ 71%] estimating peak directions...[?7h[?7l sh2peaks: [ 72%] estimating peak directions...[?7h[?7l sh2peaks: [ 73%] estimating peak directions...[?7h[?7l sh2peaks: [ 74%] estimating peak directions...[?7h[?7l sh2peaks: [ 75%] estimating peak directions...[?7h[?7l sh2peaks: [ 76%] estimating peak directions...[?7h[?7l sh2peaks: [ 77%] estimating peak directions...[?7h[?7l sh2peaks: [ 78%] estimating peak directions...[?7h[?7l sh2peaks: [ 79%] estimating peak directions...[?7h[?7l sh2peaks: [ 80%] estimating peak directions...[?7h[?7l sh2peaks: [ 81%] estimating peak directions...[?7h[?7l sh2peaks: [ 82%] estimating peak directions...[?7h[?7l sh2peaks: [ 83%] estimating peak directions...[?7h[?7l sh2peaks: [ 84%] estimating peak directions...[?7h[?7l sh2peaks: [ 85%] estimating peak directions...[?7h[?7l sh2peaks: [ 86%] estimating peak directions...[?7h[?7l sh2peaks: [ 87%] estimating peak directions...[?7h[?7l sh2peaks: [ 88%] estimating peak directions...[?7h[?7l sh2peaks: [ 89%] estimating peak directions...[?7h[?7l sh2peaks: [ 90%] estimating peak directions...[?7h[?7l sh2peaks: [ 91%] estimating peak directions...[?7h[?7l sh2peaks: [ 92%] estimating peak directions...[?7h[?7l sh2peaks: [ 93%] estimating peak directions...[?7h[?7l sh2peaks: [ 94%] estimating peak directions...[?7h[?7l sh2peaks: [ 95%] estimating peak directions...[?7h[?7l sh2peaks: [ 96%] estimating peak directions...[?7h[?7l sh2peaks: [ 97%] estimating peak directions...[?7h[?7l sh2peaks: [ 98%] estimating peak directions...[?7h[?7l sh2peaks: [ 99%] estimating peak directions...[?7h sh2peaks: [100%] estimating peak directions ================================================================= ==704462==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x561394cc964d in operator new(unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/sh2peaks+0xeb64d) (BuildId: e178990b369260b54834200e31c68f0094e4c674) #1 0x561394d1a723 in Processor::Processor(MR::Image&, Eigen::Matrix&, int, int, MR::vector, float, MR::Image, bool) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/sh2peaks.cpp:160:39 #2 0x561394cd6dad in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/sh2peaks.cpp:330:13 #3 0x561394ccc08b in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #4 0x7f3b38029d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 Indirect leak of 51200 byte(s) in 1 object(s) allocated from: #0 0x561394cc964d in operator new(unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/sh2peaks+0xeb64d) (BuildId: e178990b369260b54834200e31c68f0094e4c674) #1 0x561394d23c52 in std::__new_allocator::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/new_allocator.h:137:27 #2 0x561394d23c52 in std::allocator_traits >::allocate(std::allocator&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:464:20 #3 0x561394d23c52 in std::_Vector_base >::_M_allocate(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:378:20 #4 0x561394d23c52 in std::vector >::_M_default_append(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:657:34 #5 0x561394d233be in std::vector >::resize(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:1011:4 #6 0x561394d233be in MR::Math::SH::PrecomputedAL::init(int, int) /home/unimelb.edu.au/robertes/src/sanitisers/core/math/SH.h:345:8 #7 0x561394d1a74c in MR::Math::SH::PrecomputedAL::PrecomputedAL(int, int) /home/unimelb.edu.au/robertes/src/sanitisers/core/math/SH.h:335:54 #8 0x561394d1a74c in Processor::Processor(MR::Image&, Eigen::Matrix&, int, int, MR::vector, float, MR::Image, bool) /home/unimelb.edu.au/robertes/src/sanitisers/cmd/sh2peaks.cpp:160:43 #9 0x561394cd6dad in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/sh2peaks.cpp:330:13 #10 0x561394ccc08b in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #11 0x7f3b38029d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 SUMMARY: AddressSanitizer: 51240 byte(s) leaked in 2 allocation(s). testing_diff_peaks: [ERROR] no filename supplied to standard input (broken pipe?) testing_diff_peaks: [ERROR] error opening image "-" ```

2779:

402/488 Test 402: bin_tckgen_11 .....................***Failed 0.28 sec ``` tckgen: [WARNING] existing output files will be overwritten [?7l tckgen: [ 35%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 37%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 38%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 39%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 40%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 41%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 42%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 43%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 44%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 45%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 46%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 47%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 48%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 49%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 50%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 51%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 52%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 53%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 54%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 55%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 56%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 57%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 58%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 59%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 60%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 61%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 62%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 63%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 64%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 65%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 66%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 67%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 68%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 69%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 70%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 71%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 72%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 73%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 74%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 75%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 76%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 77%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 78%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 79%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 80%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 81%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 82%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 83%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 84%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 85%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 86%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 87%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 88%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 89%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 90%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 91%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 92%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 93%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 94%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 95%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 96%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 97%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 98%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [ 99%] preloading data for "SIFT_phantom/dwi.mif"...[?7h[?7l tckgen: [100%] preloading data for "SIFT_phantom/dwi.mif"...[?7h tckgen: [100%] preloading data for "SIFT_phantom/dwi.mif" ================================================================= ==707056==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000073168 at pc 0x55f8a903aa5c bp 0x7f54fb8ece90 sp 0x7f54fb8ece88 READ of size 16 at 0x603000073168 thread T95 #0 0x55f8a903aa5b in void MR::DWI::Bootstrap, MR::DWI::Tractography::Algorithms::Tensor_Prob::WildBootstrap, 256ul>::get_values >(Eigen::Matrix&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/bootstrap.h:62:21 #1 0x55f8a903aa5b in MR::DWI::Tractography::Algorithms::Tensor_Prob::Interp::get(Eigen::Matrix const&, Eigen::Matrix&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/algorithms/tensor_prob.h:122:15 #2 0x55f8a904482f in MR::DWI::Tractography::Algorithms::Tensor_Prob::next() /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/algorithms/tensor_prob.h:63:17 #3 0x55f8a904482f in MR::DWI::Tractography::Tracking::Exec::iterate() /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:138:61 #4 0x55f8a9043ee8 in MR::DWI::Tractography::Tracking::Exec::gen_track_unidir(MR::DWI::Tractography::Tracking::GeneratedTrack&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:261:23 #5 0x55f8a9042b32 in MR::DWI::Tractography::Tracking::Exec::gen_track(MR::DWI::Tractography::Tracking::GeneratedTrack&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:208:5 #6 0x55f8a9041a12 in MR::DWI::Tractography::Tracking::Exec::operator()(MR::DWI::Tractography::Tracking::GeneratedTrack&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:118:5 #7 0x55f8a8eff903 in MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::execute() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:690:12 #8 0x55f8a8f0052e in void std::__invoke_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>(std::__invoke_memfun_deref, void (MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::*&&)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #9 0x55f8a8f0052e in std::__invoke_result, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>::type std::__invoke, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>(void (MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::*&&)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #10 0x55f8a8f0052e in void std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 #11 0x55f8a8f0052e in std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 #12 0x55f8a8f0052e in std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1430:6 #13 0x55f8a8f0052e in std::unique_ptr, std::__future_base::_Result_base::_Deleter> std::__invoke_impl, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 #14 0x55f8a8f0052e in std::enable_if, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>, std::unique_ptr >::type std::__invoke_r, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>(std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:114:9 #15 0x55f8a8f0052e in std::_Function_handler (), std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void> >::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 #16 0x55f8a8f4ff3e in std::function ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 #17 0x55f8a8f4ff3e in std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:587:27 #18 0x55f8a8f501ab in void std::__invoke_impl ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #19 0x55f8a8f501ab in std::__invoke_result ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>::type std::__invoke ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #20 0x55f8a8f501ab in void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:852:4 #21 0x55f8a8f501ab in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:21 #22 0x55f8a8f501ab in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:16 #23 0x7f5505a99ee7 in __pthread_once_slow nptl/./nptl/pthread_once.c:116:7 #24 0x55f8a8f4f7d0 in __gthread_once(int*, void (*)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:700:12 #25 0x55f8a8f4f7d0 in void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:859:21 #26 0x55f8a8f4f7d0 in std::__future_base::_State_baseV2::_M_set_result(std::function ()>, bool) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:426:2 #27 0x55f8a8effef7 in std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1772:6 #28 0x55f8a8f008bb in void std::__invoke_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*>(std::__invoke_memfun_deref, void (std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*&&)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #29 0x55f8a8f008bb in std::__invoke_result, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*>::type std::__invoke, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*>(void (std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*&&)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #30 0x55f8a8f008bb in void std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 #31 0x55f8a8f008bb in std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 #32 0x55f8a8f008bb in std::thread::_State_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::*)(), std::__future_base::_Async_state_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>*> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:231:13 #33 0x7f5505edc252 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) #34 0x7f5505a94ac2 in start_thread nptl/./nptl/pthread_create.c:442:8 #35 0x7f5505b2684f misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 0x603000073168 is located 0 bytes to the right of 24-byte region [0x603000073150,0x603000073168) allocated by thread T95 here: #0 0x55f8a8e8dc8d in operator new(unsigned long) (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/tckgen+0xfac8d) (BuildId: fd543f4b7837e8fea565efcb055ed75b069e1221) #1 0x55f8a903ae56 in std::__new_allocator >::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/new_allocator.h:137:27 #2 0x55f8a903ae56 in std::allocator_traits > >::allocate(std::allocator >&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:464:20 #3 0x55f8a903ae56 in std::_Vector_base, std::allocator > >::_M_allocate(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:378:20 #4 0x55f8a903ae56 in void std::vector, std::allocator > >::_M_realloc_insert >(__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >, MR::vector&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:453:33 #5 0x55f8a9037910 in MR::vector& std::vector, std::allocator > >::emplace_back >(MR::vector&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:123:4 #6 0x55f8a9037910 in std::vector, std::allocator > >::push_back(MR::vector&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:1294:9 #7 0x55f8a9037910 in MR::DWI::Bootstrap, MR::DWI::Tractography::Algorithms::Tensor_Prob::WildBootstrap, 256ul>::clear() /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/bootstrap.h:69:20 #8 0x55f8a9042164 in MR::DWI::Tractography::Algorithms::Tensor_Prob::init() /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/algorithms/tensor_prob.h:56:12 #9 0x55f8a9042164 in MR::DWI::Tractography::Tracking::Exec::seed_track(MR::DWI::Tractography::Tracking::GeneratedTrack&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:186:47 #10 0x55f8a9041981 in MR::DWI::Tractography::Tracking::Exec::operator()(MR::DWI::Tractography::Tracking::GeneratedTrack&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:111:10 #11 0x55f8a8eff903 in MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::execute() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:690:12 #12 0x55f8a8f0052e in void std::__invoke_impl, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>(std::__invoke_memfun_deref, void (MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::*&&)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #13 0x55f8a8f0052e in std::__invoke_result, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>::type std::__invoke, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*>(void (MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >::*&&)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #14 0x55f8a8f0052e in void std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 #15 0x55f8a8f0052e in std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 #16 0x55f8a8f0052e in std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1430:6 #17 0x55f8a8f0052e in std::unique_ptr, std::__future_base::_Result_base::_Deleter> std::__invoke_impl, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 #18 0x55f8a8f0052e in std::enable_if, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>, std::unique_ptr >::type std::__invoke_r, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&>(std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:114:9 #19 0x55f8a8f0052e in std::_Function_handler (), std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, MR::Thread::(anonymous namespace)::__Multi > >::*)(), MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >*> >, void> >::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 #20 0x55f8a8f4ff3e in std::function ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 #21 0x55f8a8f4ff3e in std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:587:27 #22 0x55f8a8f501ab in void std::__invoke_impl ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 #23 0x55f8a8f501ab in std::__invoke_result ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>::type std::__invoke ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 #24 0x55f8a8f501ab in void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:852:4 #25 0x55f8a8f501ab in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:21 #26 0x55f8a8f501ab in std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:16 #27 0x7f5505a99ee7 in __pthread_once_slow nptl/./nptl/pthread_once.c:116:7 Thread T95 created by T0 here: #0 0x55f8a8e3c33c in __interceptor_pthread_create (/home/unimelb.edu.au/robertes/src/sanitisers/build/bin/tckgen+0xa933c) (BuildId: fd543f4b7837e8fea565efcb055ed75b069e1221) #1 0x7f5505edc328 in std::thread::_M_start_thread(std::unique_ptr >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) #2 0x55f8a8efb5eb in MR::Thread::(anonymous namespace)::__multi_thread, MR::Thread::(anonymous namespace)::__Multi > > >::__multi_thread(MR::Thread::(anonymous namespace)::__Source, MR::Thread::(anonymous namespace)::__Multi > >&, unsigned long, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:148:25 #3 0x55f8a8efb5eb in MR::Thread::(anonymous namespace)::__run, MR::Thread::(anonymous namespace)::__Multi > > > >::operator()(MR::Thread::(anonymous namespace)::__Multi, MR::Thread::(anonymous namespace)::__Multi > > >&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:231:80 #4 0x55f8a8efb5eb in MR::Thread::(anonymous namespace)::__run, MR::Thread::(anonymous namespace)::__Multi > > > >::type MR::Thread::run, MR::Thread::(anonymous namespace)::__Multi > > > >(MR::Thread::(anonymous namespace)::__Multi, MR::Thread::(anonymous namespace)::__Multi > > >&&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:364:10 #5 0x55f8a8f2a21f in void MR::Thread::run_queue >, MR::Thread::(anonymous namespace)::__Batch, MR::DWI::Tractography::Tracking::WriteKernel&>(MR::Thread::(anonymous namespace)::__Multi >&&, MR::Thread::(anonymous namespace)::__Batch const&, MR::DWI::Tractography::Tracking::WriteKernel&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:958:13 #6 0x55f8a8f2a21f in MR::DWI::Tractography::Tracking::Exec::run(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, MR::DWI::Tractography::Properties&) /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/tractography/tracking/exec.h:59:7 #7 0x55f8a8e98f46 in run() /home/unimelb.edu.au/robertes/src/sanitisers/cmd/tckgen.cpp:286:5 #8 0x55f8a8e906cb in main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 #9 0x7f5505a29d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/unimelb.edu.au/robertes/src/sanitisers/src/dwi/bootstrap.h:62:21 in void MR::DWI::Bootstrap, MR::DWI::Tractography::Algorithms::Tensor_Prob::WildBootstrap, 256ul>::get_values >(Eigen::Matrix&) Shadow bytes around the buggy address: 0x0c06800065d0: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c06800065e0: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd 0x0c06800065f0: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c0680006600: fd fd fd fd fa fa fd fd fd fd fa fa 00 00 00 fa 0x0c0680006610: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd =>0x0c0680006620: fd fa fa fa fd fd fd fa fa fa 00 00 00[fa]fa fa 0x0c0680006630: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0680006640: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0680006650: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0680006660: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0680006670: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==707056==ABORTING ```

Thread sanitiser

5/9 Test 665: unittest_ordered_queue ...........***Failed 47.98 sec ``` ordered_queue: testing regular 2-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 0.906 seconds ordered_queue: order correct ordered_queue: allocated a total of 130 items ordered_queue: testing batched 2-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 0.02232 seconds ordered_queue: order correct ordered_queue: allocated a total of 16513 items ordered_queue: testing regular 3-stage queue... ================== WARNING: ThreadSanitizer: data race (pid=1199745) Write of size 8 at 0x5599b3dd98f0 by thread T7 (mutexes: write M0): #0 Item::Item() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:56:21 (ordered_queue+0x103d36) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 MR::Thread::Queue::get_item() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:521:17 (ordered_queue+0x103d36) #2 MR::Thread::Queue::Writer::Item::Item(MR::Thread::Queue::Writer const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:381:53 (ordered_queue+0x103d36) #3 MR::Thread::Queue::Writer::placeholder() const /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:397:39 (ordered_queue+0xecb51) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #4 MR::Thread::(anonymous namespace)::StoreItem::StoreItem(unsigned long, MR::Thread::Queue::Writer&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:640:67 (ordered_queue+0xecb51) #5 MR::Thread::(anonymous namespace)::__Pipe, Item>::execute() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:719:16 (ordered_queue+0xecb51) #6 void std::__invoke_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*>(std::__invoke_memfun_deref, void (MR::Thread::(anonymous namespace)::__Pipe, Item>::*&&)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0xed068) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #7 std::__invoke_result, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*>::type std::__invoke, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*>(void (MR::Thread::(anonymous namespace)::__Pipe, Item>::*&&)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0xed068) #8 void std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (ordered_queue+0xed068) #9 std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (ordered_queue+0xed068) #10 std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1430:6 (ordered_queue+0xed068) #11 std::unique_ptr, std::__future_base::_Result_base::_Deleter> std::__invoke_impl, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 (ordered_queue+0xed068) #12 std::enable_if, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>&>, std::unique_ptr >::type std::__invoke_r, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>&>(std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:114:9 (ordered_queue+0xed068) #13 std::_Function_handler (), std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void> >::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 (ordered_queue+0xed068) #14 std::function ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 (ordered_queue+0x1037df) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #15 std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:587:27 (ordered_queue+0x1037df) #16 void std::__invoke_impl ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0x103919) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #17 std::__invoke_result ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>::type std::__invoke ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0x103919) #18 void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:852:4 (ordered_queue+0x103919) #19 std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:21 (ordered_queue+0x103919) #20 std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:16 (ordered_queue+0x103919) #21 pthread_once (ordered_queue+0x57bba) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #22 __gthread_once(int*, void (*)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:700:12 (ordered_queue+0x103559) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #23 void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:859:21 (ordered_queue+0x103559) #24 std::__future_base::_State_baseV2::_M_set_result(std::function ()>, bool) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:426:2 (ordered_queue+0x103559) #25 std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1772:6 (ordered_queue+0xecd80) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #26 void std::__invoke_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*>(std::__invoke_memfun_deref, void (std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*&&)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0xed251) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #27 std::__invoke_result, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*>::type std::__invoke, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*>(void (std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*&&)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0xed251) #28 void std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (ordered_queue+0xed251) #29 std::thread::_Invoker, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (ordered_queue+0xed251) #30 std::thread::_State_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>::*)(), std::__future_base::_Async_state_impl, Item>::*)(), MR::Thread::(anonymous namespace)::__Pipe, Item>*> >, void>*> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:231:13 (ordered_queue+0xed251) #31 (libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) Previous write of size 8 at 0x5599b3dd98f0 by thread T5 (mutexes: write M1): #0 Item::Item() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:56:21 (ordered_queue+0xe70c2) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 MR::Thread::Queue::push(Item*&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:534:18 (ordered_queue+0xe70c2) #2 MR::Thread::Queue::Writer::Item::write() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:388:44 (ordered_queue+0xe70c2) #3 MR::Thread::(anonymous namespace)::StoreItem::write() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:641:29 (ordered_queue+0xe70c2) #4 MR::Thread::(anonymous namespace)::__Source::execute() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:692:18 (ordered_queue+0xe66e5) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #5 void std::__invoke_impl::*)(), MR::Thread::(anonymous namespace)::__Source*>(std::__invoke_memfun_deref, void (MR::Thread::(anonymous namespace)::__Source::*&&)(), MR::Thread::(anonymous namespace)::__Source*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0xe6c38) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #6 std::__invoke_result::*)(), MR::Thread::(anonymous namespace)::__Source*>::type std::__invoke::*)(), MR::Thread::(anonymous namespace)::__Source*>(void (MR::Thread::(anonymous namespace)::__Source::*&&)(), MR::Thread::(anonymous namespace)::__Source*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0xe6c38) #7 void std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (ordered_queue+0xe6c38) #8 std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (ordered_queue+0xe6c38) #9 std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1430:6 (ordered_queue+0xe6c38) #10 std::unique_ptr, std::__future_base::_Result_base::_Deleter> std::__invoke_impl, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 (ordered_queue+0xe6c38) #11 std::enable_if, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>&>, std::unique_ptr >::type std::__invoke_r, std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>&>(std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:114:9 (ordered_queue+0xe6c38) #12 std::_Function_handler (), std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void> >::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 (ordered_queue+0xe6c38) #13 std::function ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 (ordered_queue+0x1037df) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #14 std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:587:27 (ordered_queue+0x1037df) #15 void std::__invoke_impl ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0x103919) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #16 std::__invoke_result ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>::type std::__invoke ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0x103919) #17 void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:852:4 (ordered_queue+0x103919) #18 std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:21 (ordered_queue+0x103919) #19 std::once_flag::_Prepare_execution::_Prepare_execution ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function ()>*, bool*))::'lambda'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:788:16 (ordered_queue+0x103919) #20 pthread_once (ordered_queue+0x57bba) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #21 __gthread_once(int*, void (*)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:700:12 (ordered_queue+0x103559) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #22 void std::call_once ()>*, bool*), std::__future_base::_State_baseV2*, std::function ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:859:21 (ordered_queue+0x103559) #23 std::__future_base::_State_baseV2::_M_set_result(std::function ()>, bool) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:426:2 (ordered_queue+0x103559) #24 std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/future:1772:6 (ordered_queue+0xe6950) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #25 void std::__invoke_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*>(std::__invoke_memfun_deref, void (std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*&&)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (ordered_queue+0xe6e21) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #26 std::__invoke_result::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*>::type std::__invoke::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*>(void (std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*&&)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (ordered_queue+0xe6e21) #27 void std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (ordered_queue+0xe6e21) #28 std::thread::_Invoker::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (ordered_queue+0xe6e21) #29 std::thread::_State_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>::*)(), std::__future_base::_Async_state_impl::*)(), MR::Thread::(anonymous namespace)::__Source*> >, void>*> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:231:13 (ordered_queue+0xe6e21) #30 (libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) Location is global 'num_items' of size 8 at 0x5599b3dd98f0 (ordered_queue+0x15398f0) Mutex M0 (0x7ffe84e5e530) created at: #0 pthread_mutex_lock (ordered_queue+0x7241a) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (ordered_queue+0xd732c) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #2 std::mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:100:17 (ordered_queue+0xd732c) #3 std::lock_guard::lock_guard(std::mutex&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:229:19 (ordered_queue+0xd732c) #4 MR::Thread::Queue::register_writer() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:489:33 (ordered_queue+0xd732c) #5 MR::Thread::Queue::Writer::Writer(MR::Thread::Queue&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:360:44 (ordered_queue+0xd732c) #6 MR::Thread::(anonymous namespace)::__Pipe, Item>::__Pipe(MR::Thread::Queue&, MR::Thread::(anonymous namespace)::__Multi&, MR::Thread::Queue&, Item const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:713:9 (ordered_queue+0xd732c) #7 void MR::Thread::run_queue, Item, SinkFunctor>(SourceFunctor&&, Item const&, MR::Thread::(anonymous namespace)::__Multi&&, Item const&, SinkFunctor&&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:1033:30 (ordered_queue+0xd732c) #8 run() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:114:3 (ordered_queue+0xd732c) #9 main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 (ordered_queue+0xd5a3b) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) Mutex M1 (0x7ffe84e5e428) created at: #0 pthread_mutex_lock (ordered_queue+0x7241a) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (ordered_queue+0xd66f3) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #2 std::mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:100:17 (ordered_queue+0xd66f3) #3 std::lock_guard::lock_guard(std::mutex&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:229:19 (ordered_queue+0xd66f3) #4 MR::Thread::Queue >::register_writer() /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:489:33 (ordered_queue+0xd66f3) #5 MR::Thread::Queue >::Writer::Writer(MR::Thread::Queue >&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:360:44 (ordered_queue+0xd66f3) #6 MR::Thread::(anonymous namespace)::__Source, SourceFunctor>::__Source(MR::Thread::Queue >&, SourceFunctor&, MR::Thread::(anonymous namespace)::__Batch const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:685:9 (ordered_queue+0xd66f3) #7 void MR::Thread::run_queue, SinkFunctor>(SourceFunctor&&, MR::Thread::(anonymous namespace)::__Batch const&, SinkFunctor&&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:955:26 (ordered_queue+0xd66f3) #8 run() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:110:3 (ordered_queue+0xd66f3) #9 main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 (ordered_queue+0xd5a3b) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) Thread T7 (tid=1199767, running) created by main thread at: #0 pthread_create (ordered_queue+0x5488d) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 std::thread::_M_start_thread(std::unique_ptr >, void (*)()) (libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) #2 MR::Thread::(anonymous namespace)::__multi_thread, Item> >::__multi_thread(MR::Thread::(anonymous namespace)::__Pipe, Item>&, unsigned long, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:148:25 (ordered_queue+0xeb6d5) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #3 MR::Thread::(anonymous namespace)::__run, Item> > >::operator()(MR::Thread::(anonymous namespace)::__Multi, Item> >&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:231:80 (ordered_queue+0xeb6d5) #4 MR::Thread::(anonymous namespace)::__run, Item> > >::type MR::Thread::run, Item> > >(MR::Thread::(anonymous namespace)::__Multi, Item> >&&, std::__cxx11::basic_string, std::allocator > const&) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread.h:364:10 (ordered_queue+0xeb6d5) #5 void MR::Thread::run_queue, Item, SinkFunctor>(SourceFunctor&&, Item const&, MR::Thread::(anonymous namespace)::__Multi&&, Item const&, SinkFunctor&&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:1037:13 (ordered_queue+0xd7449) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #6 run() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:114:3 (ordered_queue+0xd7449) #7 main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 (ordered_queue+0xd5a3b) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) Thread T5 (tid=1199765, running) created by main thread at: #0 pthread_create (ordered_queue+0x5488d) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #1 std::thread::_M_start_thread(std::unique_ptr >, void (*)()) (libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2) #2 void MR::Thread::run_queue, Item, SinkFunctor>(SourceFunctor&&, Item const&, MR::Thread::(anonymous namespace)::__Multi&&, Item const&, SinkFunctor&&, unsigned long) /home/unimelb.edu.au/robertes/src/sanitisers/core/thread_queue.h:1036:13 (ordered_queue+0xd73dc) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) #3 run() /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:114:3 (ordered_queue+0xd73dc) #4 main /home/unimelb.edu.au/robertes/src/sanitisers/core/command.h:108:5 (ordered_queue+0xd5a3b) (BuildId: 91079d98ae7cc27c30de6032103d3c109a7777bd) SUMMARY: ThreadSanitizer: data race /home/unimelb.edu.au/robertes/src/sanitisers/testing/unit_tests/ordered_queue.cpp:56:21 in Item::Item() ================== received 1000000 items with 446805 items out of order source sent 1000000 items ordered_queue: done in 3.827 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 298 items ordered_queue: testing batched-unbatched 3-stage queue... received 1000000 items with 433115 items out of order source sent 1000000 items ordered_queue: done in 3.51 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 18835 items ordered_queue: testing unbatched-batched 3-stage queue... received 1000000 items with 7822 items out of order source sent 1000000 items ordered_queue: done in 3.469 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 2946 items ordered_queue: testing batched-batched regular 3-stage queue... received 1000000 items with 3046 items out of order source sent 1000000 items ordered_queue: done in 0.04781 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 36994 items ordered_queue: testing regular 4-stage queue... received 1000000 items with 435500 items out of order source sent 1000000 items ordered_queue: done in 6.249 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 466 items ordered_queue: testing batched-unbatched-unbatched 4-stage queue... received 1000000 items with 420185 items out of order source sent 1000000 items ordered_queue: done in 3.972 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 18748 items ordered_queue: testing unbatched-batched-unbatched 4-stage queue... received 1000000 items with 386440 items out of order source sent 1000000 items ordered_queue: done in 5.188 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 21675 items ordered_queue: testing unbatched-unbatched-batched regular 4-stage queue... received 1000000 items with 250486 items out of order source sent 1000000 items ordered_queue: done in 2.754 seconds ordered_queue: order mismatch ordered_queue: allocated a total of 3901 items ordered_queue: testing ordered unbatched 3-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 4.159 seconds ordered_queue: order correct ordered_queue: allocated a total of 547 items ordered_queue: testing ordered batched-batched 3-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 0.04511 seconds ordered_queue: order correct ordered_queue: allocated a total of 59394 items ordered_queue: testing unbatched 4-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 13.73 seconds ordered_queue: order correct ordered_queue: allocated a total of 774 items ordered_queue: testing ordered batched-batched-batched 4-stage queue... received 1000000 items with 0 items out of order source sent 1000000 items ordered_queue: done in 0.07252 seconds ordered_queue: order correct ordered_queue: allocated a total of 82819 items ThreadSanitizer: reported 1 warnings ```

Error message for thread testing across all binaries not shown due to size. Presumably #2755.

Lestropie commented 10 months ago

Initial attempt at the mrmath one wasn't successful. Problem is that an Image<Median> is constructed, where the Median instance at each voxel dynamically allocates memory. Worse, for each operation it has to construct a copy of the "operation" at that voxel, call the functor, then write the new updated instance back to the image. I had hoped that using a std::shared_ptr<vector<value_type>> within each Median instance, and clearing it when result() is called, would resolve, but it doesn't seem to. Will have to revisit.

The tckgen one will be something to do with the WildBootstrap implementation; tensor_prob just happens to be the only algorithm currently using it. Will try to have a peek given @jdtournier may not be able to find the time.

Lestropie commented 10 months ago

While it is tests only applicable on dev that have identified these faults, the faults themselves are also present on master. So depending on timeline, we may want to manually apply the same fixes to master.

Lestropie commented 10 months ago

Updated list to include #2779 resolving tckgen.

Lestropie commented 10 months ago

Updated list to include #2784 resolving mrmath. This is the last of the memory leak problems to have a solution implemented; once these have all been merged to dev, this Issue will be closed, and we will consider integrating address sanitiser checks into CI via #2763.

daljit46 commented 7 months ago

Error message for thread testing across all binaries not shown due to size. Presumably https://github.com/MRtrix3/mrtrix3/pull/2755.

This seems to be a different issue. It seems that we have another data race in MR::Thread::queue (see https://github.com/MRtrix3/mrtrix3/actions/runs/8740857148).

Lestropie commented 6 months ago

Closing; issues caught have been addressed, and #2763 can hopefully catch anything that either gets introduced or has thus far slipped through.