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

ASAN_CFLAGS doesn't need -fno-common for gcc/clang

XMLWordPrintable

      ASAN_CFLAGS currently includes -fno-common. This is because asan can't protect accesses to common symbols, and -fcommon used to be the default. However, -fno-common has been the default in both gcc and clang for some time. The gcc/clang definition for ASAN_CFLAGS is the only place where we explicitly set either value for this option.

      gcc10 changed the default, and is already our earliest version.
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678

      clang11 changed the default, and clang13 is our earliest supported version
      https://github.com/llvm/llvm-project/commit/0a9fc9233e172601e26381810d093e02ef410f65
      https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html

      As noted in the comments for the gcc change, code that relied on -fcommon was never standards compliant.

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: