Skip to content

TeamLocalityTest: Subdomain tag too short #161

@devreal

Description

@devreal

It seems that there is a problem with the TeamLocalityTest. Valgrind reports:

[=   2  LOG =]       TeamLocalityTest.h :  30 | ===> Running test case with 4 units ... 
==6396== Conditional jump or move depends on uninitialised value(s)
==6396==    at 0x4C30A0A: __GI_strchr (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6396==    by 0x6E4FD1: dart__base__locality__domain_group (locality.c:525)
==6396==    by 0x6B8174: dash::util::LocalityDomain::group(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (LocalityDomain.cc:256)
==6396==    by 0x62E3BE: group (TeamLocality.h:217)
==6396==    by 0x62E3BE: TeamLocalityTest_GroupUnits_Test::TestBody() (TeamLocalityTest.cc:182)
==6396==    by 0x6A773A: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x6A0D3E: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x68447B: testing::Test::Run() (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x684E13: testing::TestInfo::Run() (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x685506: testing::TestCase::Run() (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x68C64D: testing::internal::UnitTestImpl::RunAllTests() (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x6A8D12: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)
==6396==    by 0x6A1B80: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/joseph/src/dash/dash/build/bin/dash-test-mpi)

Adding some debug output to dart__base__locality__domain_group, I see that strlen(group_subdomain_tags[sd]) < (group_parent_domain_tag_len + 1):

[=   0  LOG =]       TeamLocalityTest.h :  30 | ===> Running test case with 4 units ... 
[=   3  LOG =]       TeamLocalityTest.h :  30 | ===> Running test case with 4 units ... 
[=   1  LOG =]       TeamLocalityTest.h :  30 | ===> Running test case with 4 units ... 
[=   2  LOG =]       TeamLocalityTest.h :  30 | ===> Running test case with 4 units ... 
[    0 ERROR ] [  7484 ] locality.c               :528  !!! DART: group_subdomain_tags[sd] = '.0.0.0.0.1.0.0' too short (required at least 15)
[    0 ERROR ] [  7484 ] locality.c               :528  !!! DART: group_subdomain_tags[sd] = '.0.0.0.0.1.0.0' too short (required at least 15)
[    0 ERROR ] [  7484 ] domain_locality.c        :174  !!! DART: dart__base__locality__domain__copy: domain .0.0.0.0.1.0.0 has num_domains = 0, expected domains = NULL

Note that (group_parent_domain_tag_len + 1) is 15 in this case and group_subdomain_tags[sd] contains '.0.0.0.0.1.0.0'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions