Skip to content

Instantly share code, notes, and snippets.

@t-mat
Last active December 24, 2015 00:19
Show Gist options
  • Select an option

  • Save t-mat/6716399 to your computer and use it in GitHub Desktop.

Select an option

Save t-mat/6716399 to your computer and use it in GitHub Desktop.
Result of testing lz4mt with valgrind.

Result of testing lz4mt with valgrind

lz4mt version

lz4mt 86531278a0

Dataset

enwik8 : http://cs.fit.edu/~mmahoney/compression/textdata.html

Testing environment

$ uname -r
3.8.0-30-generic

$ valgrind --version
valgrind-3.8.1

$ md5sum enwik8
a1fa5ffddb56f4953e226637dabbb36a  enwik8

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) 

valgrind --leak-check=full --tool=memcheck ./lz4mt -c0

$ valgrind --leak-check=full --tool=memcheck ./lz4mt -c0 -y enwik8 enwik8.linux.lz4.c0
==7724== Memcheck, a memory error detector
==7724== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==7724== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==7724== Command: ./lz4mt -c0 -y enwik8 enwik8.linux.lz4.c0
==7724== 
==7724== 
==7724== HEAP SUMMARY:
==7724==     in use at exit: 75 bytes in 2 blocks
==7724==   total heap usage: 387 allocs, 385 frees, 41,970,547 bytes allocated
==7724== 
==7724== 75 bytes in 2 blocks are possibly lost in loss record 1 of 1
==7724==    at 0x4C2C7A7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7724==    by 0x4EF0108: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7724==    by 0x4EF1AE4: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7724==    by 0x4EF1BC2: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7724==    by 0x4031FF: main (main.cpp:96)
==7724== 
==7724== LEAK SUMMARY:
==7724==    definitely lost: 0 bytes in 0 blocks
==7724==    indirectly lost: 0 bytes in 0 blocks
==7724==      possibly lost: 75 bytes in 2 blocks
==7724==    still reachable: 0 bytes in 0 blocks
==7724==         suppressed: 0 bytes in 0 blocks
==7724== 
==7724== For counts of detected and suppressed errors, rerun with: -v
==7724== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)

valgrind --leak-check=full --tool=memcheck ./lz4mt -d

$ valgrind --leak-check=full --tool=memcheck ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7673== Memcheck, a memory error detector
==7673== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==7673== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==7673== Command: ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7673== 
==7673== 
==7673== HEAP SUMMARY:
==7673==     in use at exit: 88 bytes in 2 blocks
==7673==   total heap usage: 384 allocs, 382 frees, 41,970,847 bytes allocated
==7673== 
==7673== 88 bytes in 2 blocks are possibly lost in loss record 1 of 1
==7673==    at 0x4C2C7A7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7673==    by 0x4EF0108: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7673==    by 0x4EF1AE4: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7673==    by 0x4EF1BC2: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7673==    by 0x4031FF: main (main.cpp:96)
==7673== 
==7673== LEAK SUMMARY:
==7673==    definitely lost: 0 bytes in 0 blocks
==7673==    indirectly lost: 0 bytes in 0 blocks
==7673==      possibly lost: 88 bytes in 2 blocks
==7673==    still reachable: 0 bytes in 0 blocks
==7673==         suppressed: 0 bytes in 0 blocks
==7673== 
==7673== For counts of detected and suppressed errors, rerun with: -v
==7673== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)

valgrind --tool=helgrind ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0

$ valgrind --tool=helgrind ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7558== Helgrind, a thread error detector
==7558== Copyright (C) 2007-2012, and GNU GPL'd, by OpenWorks LLP et al.
==7558== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==7558== Command: ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7558== 
==7558== ---Thread-Announcement------------------------------------------
==7558== 
==7558== Thread #2 was created
==7558==    at 0x5665DDE: clone (clone.S:76)
==7558==    by 0x5355F44: do_clone.constprop.4 (createthread.c:74)
==7558==    by 0x535766D: pthread_create@@GLIBC_2.2.5 (createthread.c:244)
==7558==    by 0x4C2F718: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x4EE8907: std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x40C026: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)) (thread:133)
==7558==    by 0x40E772: lz4mtDecompress (new_allocator.h:110)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during read of size 8 at 0x5C3A5B8 by thread #2
==7558== Locks held: none
==7558==    at 0x40A8EE: std::thread::_Impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&)::{lambda()#1} ()> >::~_Impl() (shared_ptr_base.h:557)
==7558==    by 0x40CAB9: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (shared_ptr_base.h:147)
==7558==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7558==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7558==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7558==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558== 
==7558== Address 0x5C3A5B8 is 40 bytes inside a block of size 56 alloc'd
==7558==    at 0x4C2C857: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x40CA06: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:94)
==7558==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7558==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7558==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7558==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during write of size 8 at 0x5C3A5A8 by thread #2
==7558== Locks held: none
==7558==    at 0x40A8F2: std::thread::_Impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&)::{lambda()#1} ()> >::~_Impl() (thread:97)
==7558==    by 0x40CAB9: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (shared_ptr_base.h:147)
==7558==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7558==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7558==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7558==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558== 
==7558== Address 0x5C3A5A8 is 24 bytes inside a block of size 56 alloc'd
==7558==    at 0x4C2C857: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x40CA06: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:94)
==7558==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7558==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7558==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7558==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558== 
==7558== ---Thread-Announcement------------------------------------------
==7558== 
==7558== Thread #1 is the program's root thread
==7558== 
==7558== ---Thread-Announcement------------------------------------------
==7558== 
==7558== Thread #4 was created
==7558==    at 0x5665DDE: clone (clone.S:76)
==7558==    by 0x5355F44: do_clone.constprop.4 (createthread.c:74)
==7558==    by 0x535766D: pthread_create@@GLIBC_2.2.5 (createthread.c:244)
==7558==    by 0x4C2F718: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x4EE8907: std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x40C026: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)) (thread:133)
==7558==    by 0x40E772: lz4mtDecompress (new_allocator.h:110)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during write of size 8 at 0x5C3A770 by thread #1
==7558== Locks held: none
==7558==    at 0x412109: void std::vector<std::future<Lz4MtResult>, std::allocator<std::future<Lz4MtResult> > >::_M_emplace_back_aux<std::future<Lz4MtResult> >(std::future<Lz4MtResult>&&) (shared_ptr_base.h:825)
==7558==    by 0x40E8FC: lz4mtDecompress (vector.tcc:102)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== This conflicts with a previous read of size 8 by thread #4
==7558== Locks held: none
==7558==    at 0x40D5AF: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:754)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x4C2F8BD: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558== 
==7558== Address 0x5C3A770 is 0 bytes inside a block of size 16 alloc'd
==7558==    at 0x4C2C857: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x41207C: void std::vector<std::future<Lz4MtResult>, std::allocator<std::future<Lz4MtResult> > >::_M_emplace_back_aux<std::future<Lz4MtResult> >(std::future<Lz4MtResult>&&) (new_allocator.h:94)
==7558==    by 0x40E8FC: lz4mtDecompress (vector.tcc:102)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during write of size 8 at 0x7FEFFF6D0 by thread #1
==7558== Locks held: none
==7558==    at 0x4121F0: void std::vector<std::future<Lz4MtResult>, std::allocator<std::future<Lz4MtResult> > >::_M_emplace_back_aux<std::future<Lz4MtResult> >(std::future<Lz4MtResult>&&) (vector.tcc:434)
==7558==    by 0x40E8FC: lz4mtDecompress (vector.tcc:102)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== This conflicts with a previous read of size 8 by thread #4
==7558== Locks held: none
==7558==    at 0x40D5AC: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:754)
==7558==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7558==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7558==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7558==    by 0x535C38F: pthread_once (pthread_once.S:103)
==7558==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x4C2F8BD: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558== 
==7558== ---Thread-Announcement------------------------------------------
==7558== 
==7558== Thread #8 was created
==7558==    at 0x5665DDE: clone (clone.S:76)
==7558==    by 0x5355F44: do_clone.constprop.4 (createthread.c:74)
==7558==    by 0x535766D: pthread_create@@GLIBC_2.2.5 (createthread.c:244)
==7558==    by 0x4C2F718: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x4EE8907: std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x40C026: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)) (thread:133)
==7558==    by 0x40E772: lz4mtDecompress (new_allocator.h:110)
==7558==    by 0x404891: main (main.cpp:480)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during write of size 8 at 0xA0456F8 by thread #8
==7558== Locks held: none
==7558==    at 0x4112C6: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (mutex:812)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x4C2F8BD: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x5356F8D: start_thread (pthread_create.c:311)
==7558==    by 0x5665E1C: clone (clone.S:113)
==7558== 
==7558== ----------------------------------------------------------------
==7558== 
==7558== Possible data race during write of size 8 at 0xA0456F0 by thread #8
==7558== Locks held: none
==7558==    at 0x4112D1: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (mutex:813)
==7558==    by 0x4EE89EF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7558==    by 0x4C2F8BD: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7558==    by 0x5356F8D: start_thread (pthread_create.c:311)
==7558==    by 0x5665E1C: clone (clone.S:113)
==7558== 
==7558== 
==7558== For counts of detected and suppressed errors, rerun with: -v
==7558== Use --history-level=approx or =none to gain increased speed, at
==7558== the cost of reduced accuracy of conflicting-access information
==7558== ERROR SUMMARY: 80 errors from 6 contexts (suppressed: 2142 from 146)

valgrind --tool=drd

$ valgrind --tool=drd ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7781== drd, a thread error detector
==7781== Copyright (C) 2006-2012, and GNU GPL'd, by Bart Van Assche.
==7781== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==7781== Command: ./lz4mt -d -y enwik8.linux.lz4.c0 enwik8.linux.lz4.d0
==7781== 
==7781== Thread 4:
==7781== Conflicting load by thread 4 at 0x05c44d48 size 8
==7781==    at 0x40A8EE: std::thread::_Impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&)::{lambda()#1} ()> >::~_Impl() (shared_ptr_base.h:557)
==7781==    by 0x40CAB9: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (shared_ptr_base.h:147)
==7781==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7781==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7781==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7781==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7781==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7781==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7781==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7781==    by 0x536738F: pthread_once (pthread_once.S:103)
==7781==    by 0x4C30814: pthread_once (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7781== Address 0x5c44d48 is at offset 40 from 0x5c44d20. Allocation context:
==7781==    at 0x4C2E707: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x40CA06: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:94)
==7781==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7781==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7781==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7781==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7781==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7781==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7781==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7781==    by 0x536738F: pthread_once (pthread_once.S:103)
==7781==    by 0x4C30814: pthread_once (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7781== Other segment start (thread 5)
==7781==    (thread finished, call stack no longer available)
==7781== Other segment end (thread 5)
==7781==    (thread finished, call stack no longer available)
==7781== 
==7781== Conflicting store by thread 4 at 0x05c44d38 size 8
==7781==    at 0x40A8F2: std::thread::_Impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&)::{lambda()#1} ()> >::~_Impl() (thread:97)
==7781==    by 0x40CAB9: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (shared_ptr_base.h:147)
==7781==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7781==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7781==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7781==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7781==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7781==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7781==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7781==    by 0x536738F: pthread_once (pthread_once.S:103)
==7781==    by 0x4C30814: pthread_once (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7781== Address 0x5c44d38 is at offset 24 from 0x5c44d20. Allocation context:
==7781==    at 0x4C2E707: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x40CA06: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:94)
==7781==    by 0x40CBB4: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>, void>*, std::allocator<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> const&, lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}&&) (new_allocator.h:110)
==7781==    by 0x40CC28: std::shared_ptr<std::__future_base::_State_base> std::__future_base::_S_make_async_state<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()> >(std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>&&) (shared_ptr_base.h:997)
==7781==    by 0x40CFE1: std::future<std::result_of<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3} ()>::type> std::async<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const::{lambda()#3}>(std::launch, std::future&&, (std::result_of&&)...) (future:1491)
==7781==    by 0x40D613: lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1}::operator()(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int) const (lz4mt.cpp:672)
==7781==    by 0x4126D9: std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult>::operator()() (functional:2310)
==7781==    by 0x412752: std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Lz4MtResult>, std::__future_base::_Result_base::_Deleter>, Lz4MtResult> >::_M_invoke(std::_Any_data const&) (functional:1911)
==7781==    by 0x408498: std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) (functional:2310)
==7781==    by 0x536738F: pthread_once (pthread_once.S:103)
==7781==    by 0x4C30814: pthread_once (in /usr/lib/valgrind/vgpreload_drd-amd64-linux.so)
==7781==    by 0x4112EC: std::__future_base::_Async_state_impl<std::_Bind_simple<lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)>, Lz4MtResult>::_Async_state_impl(lz4mtDecompress::{lambda(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int)#1} (&&)(int, Lz4Mt::MemPool::Buffer*, bool, unsigned int))::{lambda()#1}::operator()() const (gthr-default.h:718)
==7781== Other segment start (thread 5)
==7781==    (thread finished, call stack no longer available)
==7781== Other segment end (thread 5)
==7781==    (thread finished, call stack no longer available)
==7781== 
==7781== 
==7781== For counts of detected and suppressed errors, rerun with: -v
==7781== ERROR SUMMARY: 40 errors from 2 contexts (suppressed: 107 from 31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment