• Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Core
    • None

      Recently, valgrind started failing.
      @jedelbo could you take a look? It is something to do with the CopyReplication, but it is not obvious to me what it is.

      [2023/05/17 19:57:29.437] ../test/test_shared.cpp:4057: Begin Shared_CopyReplication
      [2023/05/17 19:57:29.437] ==37033== Conditional jump or move depends on uninitialised value(s)
      [2023/05/17 19:57:29.437] ==37033==    at 0xBB3A4E: realm::util::FunctionRef<void (realm::TableRef)>::FunctionRef<realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}>(realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}&&)::{lambda(void*, realm::TableRef)#1}::_FUN(void*, realm::TableRef) (copy_replication.cpp:176)
      [2023/05/17 19:57:29.437] ==37033==    by 0xBB4DC7: operator() (function_ref.hpp:119)
      [2023/05/17 19:57:29.437] ==37033==    by 0xBB4DC7: realm::_impl::CopyReplication::handle_link(realm::ColKey, realm::Mixed, realm::util::FunctionRef<void (realm::TableRef)>) (copy_replication.cpp:272)
      [2023/05/17 19:57:29.437] ==37033==    by 0xBB55F8: realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed) (copy_replication.cpp:172)
      [2023/05/17 19:57:29.437] ==37033==    by 0xB92901: realm::Dictionary::insert(realm::Mixed, realm::Mixed) (dictionary.cpp:548)
      [2023/05/17 19:57:29.437] ==37033==    by 0xB92FD1: realm::Dictionary::create_and_insert_linked_object(realm::Mixed) (dictionary.cpp:443)
      [2023/05/17 19:57:29.437] ==37033==    by 0x96C43C: Realm_UnitTest__Shared_CopyReplication::test_run() (test_shared.cpp:4123)
      [2023/05/17 19:57:29.437] ==37033==    by 0x971923: realm::test_util::unit_test::RegisterTest<Realm_UnitTest__Shared_CopyReplication>::run_test(realm::test_util::unit_test::TestContext&) (unit_test.hpp:640)
      [2023/05/17 19:57:29.437] ==37033==    by 0xAA47DC: realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) (unit_test.cpp:728)
      [2023/05/17 19:57:29.437] ==37033==    by 0xAA4F07: realm::test_util::unit_test::TestList::ThreadContextImpl::nonconcur_run() (unit_test.cpp:711)
      [2023/05/17 19:57:29.437] ==37033==    by 0xAA7745: realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config) (unit_test.cpp:625)
      [2023/05/17 19:57:29.437] ==37033==    by 0x732EAB: (anonymous namespace)::run_tests(std::shared_ptr<realm::util::Logger> const&) (test_all.cpp:511)
      [2023/05/17 19:57:29.437] ==37033==    by 0x734904: test_all(std::shared_ptr<realm::util::Logger> const&) (test_all.cpp:579)
      [2023/05/17 19:57:29.437] ==37033==  Uninitialised value was created by a stack allocation
      [2023/05/17 19:57:29.437] ==37033==    at 0xBB39F0: realm::util::FunctionRef<void (realm::TableRef)>::FunctionRef<realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}>(realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}&&)::{lambda(void*, realm::TableRef)#1}::_FUN(void*, realm::TableRef) (function_ref.hpp:105)
      [2023/05/17 19:57:29.437] ==37033==
      [2023/05/17 19:57:30.132] ../test/test_shared.cpp:4148: Begin Shared_WriteTo
      [2023/05/17 19:57:30.132] ==37033== Conditional jump or move depends on uninitialised value(s)
      [2023/05/17 19:57:30.132] ==37033==    at 0xBB3A4E: realm::util::FunctionRef<void (realm::TableRef)>::FunctionRef<realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}>(realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}&&)::{lambda(void*, realm::TableRef)#1}::_FUN(void*, realm::TableRef) (copy_replication.cpp:176)
      [2023/05/17 19:57:30.132] ==37033==    by 0xBB4DC7: operator() (function_ref.hpp:119)
      [2023/05/17 19:57:30.132] ==37033==    by 0xBB4DC7: realm::_impl::CopyReplication::handle_link(realm::ColKey, realm::Mixed, realm::util::FunctionRef<void (realm::TableRef)>) (copy_replication.cpp:272)
      [2023/05/17 19:57:30.132] ==37033==    by 0xBB55F8: realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed) (copy_replication.cpp:172)
      [2023/05/17 19:57:30.132] ==37033==    by 0xC63BFD: (anonymous namespace)::generate_properties_for_obj(realm::Replication&, realm::Obj const&, std::vector<std::pair<realm::ColKey, realm::Table*>, std::allocator<std::pair<realm::ColKey, realm::Table*> > > const&) (transaction.cpp:87)
      [2023/05/17 19:57:30.132] ==37033==    by 0xC63A0D: operator() (transaction.cpp:60)
      [2023/05/17 19:57:30.132] ==37033==    by 0xC63A0D: (anonymous namespace)::generate_properties_for_obj(realm::Replication&, realm::Obj const&, std::vector<std::pair<realm::ColKey, realm::Table*>, std::allocator<std::pair<realm::ColKey, realm::Table*> > > const&) (transaction.cpp:97)
      [2023/05/17 19:57:30.132] ==37033==    by 0xC6463A: realm::Transaction::replicate(realm::Transaction*, realm::Replication&) const (transaction.cpp:710)
      [2023/05/17 19:57:30.132] ==37033==    by 0xC64A1C: realm::Transaction::copy_to(std::shared_ptr<realm::Transaction>) const (transaction.cpp:344)
      [2023/05/17 19:57:30.132] ==37033==    by 0x96E3F1: Realm_UnitTest__Shared_WriteTo::test_run() (test_shared.cpp:4261)
      [2023/05/17 19:57:30.132] ==37033==    by 0x971963: realm::test_util::unit_test::RegisterTest<Realm_UnitTest__Shared_WriteTo>::run_test(realm::test_util::unit_test::TestContext&) (unit_test.hpp:640)
      [2023/05/17 19:57:30.132] ==37033==    by 0xAA47DC: realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) (unit_test.cpp:728)
      [2023/05/17 19:57:30.132] ==37033==    by 0xAA4F07: realm::test_util::unit_test::TestList::ThreadContextImpl::nonconcur_run() (unit_test.cpp:711)
      [2023/05/17 19:57:30.132] ==37033==    by 0xAA7745: realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config) (unit_test.cpp:625)
      [2023/05/17 19:57:30.132] ==37033==  Uninitialised value was created by a stack allocation
      [2023/05/17 19:57:30.132] ==37033==    at 0xBB39F0: realm::util::FunctionRef<void (realm::TableRef)>::FunctionRef<realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}>(realm::_impl::CopyReplication::dictionary_insert(realm::CollectionBase const&, unsigned long, realm::Mixed, realm::Mixed)::{lambda(realm::TableRef)#1}&&)::{lambda(void*, realm::TableRef)#1}::_FUN(void*, realm::TableRef) (function_ref.hpp:105)
      [2023/05/17 19:57:30.132] ==37033==
      

            Assignee:
            jorgen.edelbo@mongodb.com Jørgen Edelbo
            Reporter:
            james.stone@mongodb.com James Stone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: