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

[ubsan] test_committed_virtualmemory.cpp check_covered_pages shows overflow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 26
    • hotspot
    • None
    • aarch64
    • os_x

      When running jtreg test
      gtest/NMTGtests.java#nmt-detail
      with ubsan-enabled binaries on macOS aarch64, we run into this ubsan - issue :

      /jdk/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp:80:32: runtime error: addition of unsigned offset to 0x000109400000 overflowed to 0x0001093fc000
          #0 0x1097c3514 in CommittedVirtualMemoryTest::check_covered_pages(unsigned char*, unsigned long, unsigned char*, unsigned long, int*)+0x228 (libjvm.dylib:arm64+0xe7514)
          #1 0x1097c32d4 in CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&)::operator()(CommittedMemoryRegion const&) const+0x98 (libjvm.dylib:arm64+0xe72d4)
          #2 0x1097c311c in void RegionsTree::visit_committed_regions<CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&)>(ReservedMemoryRegion const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))::'lambda'(Treap<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, TreapCHeapAllocator>::TreapNode*)::operator()(Treap<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, TreapCHeapAllocator>::TreapNode*) const+0x9c (libjvm.dylib:arm64+0xe711c)
          #3 0x1097c2f5c in void Treap<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, TreapCHeapAllocator>::visit_range_in_order<void RegionsTree::visit_committed_regions<CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&)>(ReservedMemoryRegion const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))::'lambda'(Treap<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, TreapCHeapAllocator>::TreapNode*)>(unsigned long const&, unsigned long const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))+0x118 (libjvm.dylib:arm64+0xe6f5c)
          #4 0x1097c2dfc in void VMATree::visit_range_in_order<void RegionsTree::visit_committed_regions<CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&)>(ReservedMemoryRegion const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))::'lambda'(Treap<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, TreapCHeapAllocator>::TreapNode*)>(unsigned long const&, unsigned long const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))+0x24 (libjvm.dylib:arm64+0xe6dfc)
          #5 0x1097c2cd4 in void RegionsTree::visit_committed_regions<CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&)>(ReservedMemoryRegion const&, CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)::'lambda'(CommittedMemoryRegion const&))+0x58 (libjvm.dylib:arm64+0xe6cd4)
          #6 0x1097c2908 in CommittedVirtualMemoryTest::test_committed_region_impl(unsigned long, unsigned long, int*)+0x3ec (libjvm.dylib:arm64+0xe6908)
          #7 0x1097bf43c in NMTCommittedVirtualMemoryTracker_test_committed_virtualmemory_region_vm_Test::TestBody()+0x88 (libjvm.dylib:arm64+0xe343c)
          #8 0x10b32df10 in testing::Test::Run()+0xc0 (libjvm.dylib:arm64+0x1c51f10)
          #9 0x10b32f0f4 in testing::TestInfo::Run()+0x1e4 (libjvm.dylib:arm64+0x1c530f4)
          #10 0x10b330ab4 in testing::TestSuite::Run()+0x43c (libjvm.dylib:arm64+0x1c54ab4)
          #11 0x10b33e000 in testing::internal::UnitTestImpl::RunAllTests()+0x48c (libjvm.dylib:arm64+0x1c62000)
          #12 0x10b33d8e8 in testing::UnitTest::Run()+0x78 (libjvm.dylib:arm64+0x1c618e8)
          #13 0x1096e0780 in runUnitTestsInner(int, char**)+0x724 (libjvm.dylib:arm64+0x4780)
          #14 0x104fe7f08 in main+0x2c (gtestLauncher:arm64+0x100003f08)
          #15 0x196fea0dc (<unknown module>)

            Unassigned Unassigned
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: