Closed vrancurel closed 5 years ago
After merging #254 and #262 this time the valgrind is fatal in liberasurecode_test
193 - test_verify_stripe_metadata_be_ver_mismatch: quadiron_fnt_nsys (idx=0) ... ok
194 - test_verify_stripe_metadata_frag_idx_invalid: quadiron_fnt_nsys (idx=0) ... ==21957== Conditional jump or move depends on uninitialised value(s)
==21957== at 0x8E4A3E9: __addvdi3 (in /lib/x86_64-linux-gnu/libgcc_s.so.1)
==21957== by 0x7CCEB45: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:195)
==21957== by 0x7CCE488: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:500)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957== by 0x5047E41: liberasurecode_encode (erasurecode.c:483)
==21957== by 0x10F14F: verify_fragment_metadata_mismatch_impl (liberasurecode_test.c:1703)
==21957== by 0x10F404: test_verify_stripe_metadata_frag_idx_invalid (liberasurecode_test.c:1795)
==21957== by 0x10BB85: main (liberasurecode_test.c:1985)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCF51E: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1584)
==21957== by 0x7CCEF03: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1722)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE3FE: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:495)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957==
==21957== Conditional jump or move depends on uninitialised value(s)
==21957== at 0x8E4A3E9: __addvdi3 (in /lib/x86_64-linux-gnu/libgcc_s.so.1)
==21957== by 0x7CCEB45: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:195)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957== by 0x5047E41: liberasurecode_encode (erasurecode.c:483)
==21957== by 0x10F14F: verify_fragment_metadata_mismatch_impl (liberasurecode_test.c:1703)
==21957== by 0x10F404: test_verify_stripe_metadata_frag_idx_invalid (liberasurecode_test.c:1795)
==21957== by 0x10BB85: main (liberasurecode_test.c:1985)
==21957==
==21957== Conditional jump or move depends on uninitialised value(s)
==21957== at 0x7CCF297: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, long const&, unsigned long) const (hashtable.h:1548)
==21957== by 0x7CCEC3B: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node(unsigned long, long const&, unsigned long) const (hashtable.h:642)
==21957== by 0x7CCE7B0: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:721)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957==
==21957== Conditional jump or move depends on uninitialised value(s)
==21957== at 0x7CCF2CD: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, long const&, unsigned long) const (hashtable.h:1551)
==21957== by 0x7CCEC3B: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node(unsigned long, long const&, unsigned long) const (hashtable.h:642)
==21957== by 0x7CCE7B0: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:721)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCFB68: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) (hashtable.h:2097)
==21957== by 0x7CCF3A9: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) (hashtable.h:2068)
==21957== by 0x7CCEE95: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1715)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCFBA6: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) (hashtable.h:2101)
==21957== by 0x7CCF3A9: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) (hashtable.h:2068)
==21957== by 0x7CCEE95: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1715)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCFBCC: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) (hashtable.h:2103)
==21957== by 0x7CCF3A9: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) (hashtable.h:2068)
==21957== by 0x7CCEE95: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1715)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE590: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:510)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957==
==21957== Conditional jump or move depends on uninitialised value(s)
==21957== at 0x8E4A3E9: __addvdi3 (in /lib/x86_64-linux-gnu/libgcc_s.so.1)
==21957== by 0x7CCEB45: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:195)
==21957== by 0x7CCE50C: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:505)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957== by 0x5047E41: liberasurecode_encode (erasurecode.c:483)
==21957== by 0x10F14F: verify_fragment_metadata_mismatch_impl (liberasurecode_test.c:1703)
==21957== by 0x10F404: test_verify_stripe_metadata_frag_idx_invalid (liberasurecode_test.c:1795)
==21957== by 0x10BB85: main (liberasurecode_test.c:1985)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCF49B: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1571)
==21957== by 0x7CCEF03: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1722)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE3FE: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:495)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957==
==21957== Use of uninitialised value of size 8
==21957== at 0x7CCF4BA: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1572)
==21957== by 0x7CCEF03: std::_Hashtable<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<long const, unsigned int>, false>*) (hashtable.h:1722)
==21957== by 0x7CCE805: std::__detail::_Map_base<long, std::pair<long const, unsigned int>, std::allocator<std::pair<long const, unsigned int> >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](long const&) (hashtable_policy.h:728)
==21957== by 0x7CCDC4A: std::unordered_map<long, unsigned int, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, unsigned int> > >::operator[](long const&) (unordered_map.h:976)
==21957== by 0x7CCD87F: quadiron::Properties::add(long, unsigned int) (property.h:60)
==21957== by 0x7CCEB61: void quadiron::simd::add_props<unsigned int>(quadiron::Properties&, long long __vector(4), long long __vector(4), long long __vector(4), long, unsigned int) (simd_basic.h:196)
==21957== by 0x7CCE3FE: void quadiron::simd::encode_post_process<unsigned int>(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, unsigned int, unsigned int, unsigned long) (simd_fnt.h:495)
==21957== by 0x7CCCE62: quadiron::fec::RsFnt<unsigned int>::encode_post_process(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long) (fec_vectorisation.cpp:81)
==21957== by 0x7CEFEE6: quadiron::fec::RsFnt<unsigned int>::encode(quadiron::vec::Buffers<unsigned int>&, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, long, quadiron::vec::Buffers<unsigned int>&) (fec_rs_fnt.h:245)
==21957== by 0x7CDE7C3: quadiron::fec::FecCode<unsigned int>::encode_blocks_vertical(std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<unsigned char*, std::allocator<unsigned char*> >, std::vector<quadiron::Properties, std::allocator<quadiron::Properties> >&, std::vector<bool, std::allocator<bool> >, unsigned long) (fec_base.h:1087)
==21957== by 0x7CDA842: quadiron_fnt32_encode (quadiron_c.cpp:109)
==21957== by 0x504DC64: quadiron_fnt_encode (quadiron_fnt_common.c:51)
==21957==
liberasurecode_test: liberasurecode_test.c:1705: verify_fragment_metadata_mismatch_impl: Assertion `0 == rc' failed.
==21957==
==21957== Process terminating with default action of signal 6 (SIGABRT)
==21957== at 0x56B3E97: raise (raise.c:51)
==21957== by 0x56B5800: abort (abort.c:79)
==21957== by 0x56A5399: __assert_fail_base (assert.c:92)
==21957== by 0x56A5411: __assert_fail (assert.c:101)
==21957== by 0x10F3CD: verify_fragment_metadata_mismatch_impl (liberasurecode_test.c:1705)
==21957== by 0x10F404: test_verify_stripe_metadata_frag_idx_invalid (liberasurecode_test.c:1795)
==21957== by 0x10BB85: main (liberasurecode_test.c:1985)
==21957==
==21957== HEAP SUMMARY:
==21957== in use at exit: 90,282 bytes in 69 blocks
==21957== total heap usage: 193,540 allocs, 193,471 frees, 1,596,527,359 bytes allocated
==21957==
==21957== LEAK SUMMARY:
==21957== definitely lost: 0 bytes in 0 blocks
==21957== indirectly lost: 0 bytes in 0 blocks
==21957== possibly lost: 496 bytes in 8 blocks
==21957== still reachable: 89,786 bytes in 61 blocks
==21957== suppressed: 0 bytes in 0 blocks
==21957== Rerun with --leak-check=full to see details of leaked memory
==21957==
==21957== For counts of detected and suppressed errors, rerun with: -v
==21957== Use --track-origins=yes to see where uninitialised values come from
==21957== ERROR SUMMARY: 7819 errors from 27 contexts (suppressed: 0 from 0)
To reproduce checkout the PR https://github.com/scality/quadiron/pull/266, make install and compile liberasurecode with https://github.com/scality/liberasurecode/pull/1/files and run
$ export LD_LIBRARY_PATH=`pwd`/src/.libs:/usr/local/lib
$ valgrind test/.libs/liberasurecode_test
I found following points:
pkt_size=1024
: https://github.com/scality/quadiron/pull/266/files#diff-5989f302087e91bcabe98e18a4aad13dR40
Hence, we suppose fragment's block size is: pkt_size * sizeof(T)
pkt_size
in
block size
is calculated based on input's original data size: https://github.com/scality/liberasurecode/blob/master/src/erasurecode_preprocessing.c#L51These issues raise in cases where block size
is smaller than pkt_size * sizeof(T)
.
While running valgrind on the liberasurecode test suite (make test) with Quadiron, found those valgrind issues: