Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8349465

[UBSAN] test_os_reserve_between.cpp reported applying non-zero offset to null pointer

XMLWordPrintable

    • b10
    • x86_64, aarch64
    • linux

      Test gtest/NMTGtests.java#nmt-detail fails build with undefined sanitizer.

      The test output snippet:
      [ RUN ] os.attempt_reserve_memory_between_combos_vm
      test/hotspot/gtest/runtime/test_os_reserve_between.cpp:287:29: runtime error: applying non-zero offset 4096 to null pointer
          #0 0x7f7954890953 in os_attempt_reserve_memory_between_combos_vm_Test::TestBody() /tmp/tone/run/jtreg/jdk-repo/test/hotspot/gtest/runtime/test_os_reserve_between.cpp:287:29
          #1 0x7f795a045659 in testing::Test::Run() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/src/gtest.cc:2687:5
          #2 0x7f795a048903 in testing::TestInfo::Run() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/src/gtest.cc:2836:11
          #3 0x7f795a04a790 in testing::TestSuite::Run() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/src/gtest.cc:3015:30
          #4 0x7f795a08ccd5 in testing::internal::UnitTestImpl::RunAllTests() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/src/gtest.cc:5920:44
          #5 0x7f795a08b05c in testing::UnitTest::Run() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/src/gtest.cc:5484:10
          #6 0x7f7953ea3837 in RUN_ALL_TESTS() /tmp/tone/run/jtreg/googletest-v1.14.x/googletest/include/gtest/gtest.h:2317:73
          #7 0x7f7953ea3837 in runUnitTestsInner(int, char**) /tmp/tone/run/jtreg/jdk-repo/test/hotspot/gtest/gtestMain.cpp:290:16
          #8 0x7f7953ea407a in runUnitTests /tmp/tone/run/jtreg/jdk-repo/test/hotspot/gtest/gtestMain.cpp:371:5
          #9 0x204348 in main /tmp/tone/run/jtreg/jdk-repo/test/hotspot/gtest/gtestLauncher.cpp:40:3
          #10 0x7f794fe62a71 in __libc_start_main (/lib64/libc.so.6+0x3ea71) (BuildId: 997c63a77bcb67e45f1f5b1d6dd9d0e5ea6e7968)
          #11 0x202e98 in _start (/tmp/tone/run/jtreg/test-images/hotspot/gtest/server/gtestLauncher+0x202e98)

      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior test/hotspot/gtest/runtime/test_os_reserve_between.cpp:287:29 in

            syan Sendao Yan
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: