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

Add -fno-delete-null-pointer-checks to clang builds

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P4
    • 17
    • None
    • infrastructure
    • None
    • b25

    Description

      From the clang 12 release notes (https://releases.llvm.org/12.0.0/tools/clang/docs/ReleaseNotes.html):
      "Now that this pointers are tagged with nonnull and dereferenceable(N), -fno-delete-null-pointer-checks has gained the power to remove the nonnull attribute on this for configurations that need it to be nullable."

      The JDK code uses null "this" pointer a lot as is evident from a testrun with Undefined Behavior Sanitizer turned on. This flag (-fno-delete-null-pointer-checks) has been enabled for gcc builds for a while, and the same should be done for clang builds in order to keep JDK running as its authors intended.

      Attachments

        Issue Links

          Activity

            People

              erikj Erik Joelsson
              vprovodin Vitaly Provodin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: