-
Task
-
Resolution: Fixed
-
P4
-
None
-
None
-
b25
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.
"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.
- duplicates
-
JDK-8256836 openjdk needs -fno-delete-null-pointer-checks to build with clang 12
-
- Closed
-
- relates to
-
JDK-8316893 Compile without -fno-delete-null-pointer-checks
-
- Resolved
-