Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10417

TMVA test bug: rtensor.cxx:303

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.22/00
    • Component/s: TMVA
    • Labels:
      None
    • Environment:

      Linux, but not only

      Description

      See e.g. https://epsft-jenkins.cern.ch/job/root-nightly-master/LABEL=mac1013,SPEC=cxx14,V=master/2401/testReport/projectroot.tmva.tmva/test/gtest_tmva_tmva_test_rtensor/

      [ RUN      ] RTensor.SliceRowMajor
      /Volumes/MacintoshHD/build/jenkins/night/LABEL/mac1013/SPEC/cxx14/V/master/root/tmva/tmva/test/rtensor.cxx:303: Failure
            Expected: x(i, j)
            Which is: nan
      To be equal to: s3(i, j)
            Which is: nan
      [  FAILED  ] RTensor.SliceRowMajor (0 ms)
      

      Likely caused by

      [ RUN      ] RTensor.SliceRowMajor
      ==19961== Invalid read of size 4
      ==19961==    at 0x178929: testing::AssertionResult testing::internal::CmpHelperEQ<float, float>(char const*, char const*, float const&, float const&) (gtes
      t.h:1392)
      ==19961==    by 0x176569: testing::AssertionResult testing::internal::EqHelper<false>::Compare<float, float>(char const*, char const*, float const&, float
      const&) (gtest.h:1421)
      ==19961==    by 0x1724B5: RTensor_SliceRowMajor_Test::TestBody() (rtensor.cxx:303)
      ==19961==    by 0x1AA310: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), c$
      ar const*) (gtest.cc:2402)
      ==19961==    by 0x1A443A: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char
      const*) (gtest.cc:2438)
      ==19961==    by 0x187F57: testing::Test::Run() (gtest.cc:2474)
      ==19961==    by 0x18888D: testing::TestInfo::Run() (gtest.cc:2656)
      ==19961==    by 0x188F0F: testing::TestCase::Run() (gtest.cc:2774)
      ==19961==    by 0x18FDDB: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4649)
      ==19961==    by 0x1AB424: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTes$
      Impl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2402)
      ==19961==    by 0x1A5230: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestIm$
      l*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2438)
      ==19961==    by 0x18E99F: testing::UnitTest::Run() (gtest.cc:4257)
      ==19961==    by 0x1B8A32: RUN_ALL_TESTS() (gtest.h:2233)
      ==19961==    by 0x1B89C1: main (gtest_main.cc:37)
      ==19961==  Address 0x5db1a58 is 0 bytes after a block of size 24 alloc'd
      

      To me it looks as if

         for(auto i = 0; i < 3; i ++) {
            for(auto j = 0; j < 2; j ++) {
               EXPECT_EQ(x(i, j), s3(i, j));
            }
         }
      

      accesses out of range as x is declared as

      RTensor<float> x({2, 3}, MemoryLayout::RowMajor);
      

        Attachments

          Activity

            People

            • Assignee:
              swunsch Stefan Wunsch
              Reporter:
              axel Axel Naumann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: