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

macos attempt_reserve_memory_at(arg1, arg2, true) failure

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      A fix for JDK-8262952 (macos aarch64) involved using the following pattern:

           q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len, executable);
           EXPECT_NE(q, (address)NULL);
           EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, executable));

      where previously it used to be

           q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len);
           EXPECT_NE(q, (address)NULL);
           EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, executable));

      where the fix included the 3rd argument of attempt_reserve_memory_at(), which when omitted defaults to "false". This 3 arguments form of the API seems not to always work as expected on macos x64 according to the same test. It works fine locally for me though.

      I'm pretty sure that I also ran it previously using Mach and it worked fine, so it looks like it fails sporadically.

      We seemed to have uncovered a new bug on a different platform from that where the fix went in.

      We should temporarily disable the test on macOS x64 (previously it was disabled on macOS aarch64) and fix the underlaying issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gziemski Gerard Ziemski
              Reporter:
              gziemski Gerard Ziemski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: