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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: