Container Overflow:
Created by: NAThompson
If ADIOS2 is built with -fsanitize=address
, we obtain container overflows in ExtractSelectionFromPartialRM ffs_marshal.c:1115
.
build$ ctest -VV
➜ build git:(master) ✗ ctest -VV | grep -A 30 'AddressSanitizer:'
249: ==47811==ERROR: AddressSanitizer: container-overflow on address 0x60700000c9d0 at pc 0x00010bc68dbd bp 0x7ffeebc0f8c0 sp 0x7ffeebc0f060
249: WRITE of size 80 at 0x60700000c9d0 thread T0
249: #0 0x10bc68dbc in wrap_memmove (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1ddbc)
249: #1 0x10c935b73 in ExtractSelectionFromPartialRM ffs_marshal.c:1115
249: #2 0x10c936941 in FillReadRequests ffs_marshal.c:1275
249: #3 0x10c936272 in SstFFSPerformGets ffs_marshal.c:1307
249: #4 0x1066e5cfb in adios2::core::engine::SstReader::DoGetSync(adios2::core::Variable<double>&, double*) SstReader.cpp:432
249: #5 0x1048b541e in void adios2::core::Engine::Get<double>(adios2::core::Variable<double>&, double*, adios2::Mode) Engine.tcc:109
249: #6 0x1048b5e7c in void adios2::core::Engine::Get<double>(adios2::core::Variable<double>&, double&, adios2::Mode) Engine.tcc:131
249: #7 0x106bd8c74 in void adios2::Engine::Get<double>(adios2::Variable<double>, double&, adios2::Mode) Engine.tcc:186
249: #8 0x104007b41 in CommonReadTest_ADIOS2CommonRead1D8_Test::TestBody() TestCommonRead.cpp:237
249: #9 0x10418eb9b in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest.cc:2411
249: #10 0x1040a80a4 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest.cc:2447
249: #11 0x1040a78c3 in testing::Test::Run() gtest.cc:2485
249: #12 0x1040ac7a1 in testing::TestInfo::Run() gtest.cc:2661
249: #13 0x1040b1ac6 in testing::TestCase::Run() gtest.cc:2779
249: #14 0x1040e2c63 in testing::internal::UnitTestImpl::RunAllTests() gtest.cc:5036
249: #15 0x1041a4ce9 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) gtest.cc:2411
249: #16 0x1040e09e4 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) gtest.cc:2447
249: #17 0x1040e025a in testing::UnitTest::Run() gtest.cc:4652
249: #18 0x104010729 in RUN_ALL_TESTS() gtest.h:2314
249: #19 0x10400f056 in main TestCommonRead.cpp:361
249: #20 0x7fff78b6c3d4 in start (libdyld.dylib:x86_64+0x163d4)
It appears to me that the problem is not in fact with the identified function but with the buffer size.