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

Building with AddressSanitizer enabled fails

XMLWordPrintable

      Using the `--enable-asan` option for `bash configure` causes JDK builds to fail.

      [~rcastanedalo] also reproduced the issue and additionally noted that building with `--enable-asan` succeeds on commit ab1934848b2680aff86631e7a68e5ef22857742f. The problem was likely introduced after that.

      Error message:
      ```
      Building target 'hotspot' in configuration 'linux-x64'
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp: In constructor 'ZMarkStripeSet::ZMarkStripeSet(uintptr_t)':
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      In file included from /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.inline.hpp:27,
                       from /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:25:
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      cc1plus: all warnings being treated as errors
      lib/CompileJvm.gmk:152: recipe for target '/home/dlunden/jdk/build/linux-x64/hotspot/variant-server/libjvm/objs/zMarkStack.o' failed
      make[3]: *** [/home/dlunden/jdk/build/linux-x64/hotspot/variant-server/libjvm/objs/zMarkStack.o] Error 1
      make[3]: *** Waiting for unfinished jobs....
      make[2]: *** [hotspot-server-libs] Error 2
      make/Main.gmk:253: recipe for target 'hotspot-server-libs' failed

      ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code 2)

      === Output from failing command(s) repeated here ===
      * For target hotspot_variant-server_libjvm_objs_zMarkStack.o:
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp: In constructor 'ZMarkStripeSet::ZMarkStripeSet(uintptr_t)':
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      In file included from /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.inline.hpp:27,
                       from /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:25:
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.cpp:43:17: error: writing 80 bytes into a region of size 8 [-Werror=stringop-overflow=]
         43 | _stripes[i] = ZMarkStripe(base);
            | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /home/dlunden/jdk/open/src/hotspot/share/gc/z/zMarkStack.hpp:57:15: note: destination object 'ZStackList<ZStack<ZMarkStackEntry, 254> >::_base' of size 8
         57 | uintptr_t _base;
            | ^~~~~
         ... (rest of output omitted)

      * All command lines available in /home/dlunden/jdk/build/linux-x64/make-support/failure-logs.
      === End of repeated output ===

      === Make failed targets repeated here ===
      lib/CompileJvm.gmk:152: recipe for target '/home/dlunden/jdk/build/linux-x64/hotspot/variant-server/libjvm/objs/zMarkStack.o' failed
      make/Main.gmk:253: recipe for target 'hotspot-server-libs' failed
      === End of repeated output ===

      HELP: Try searching the build log for the name of the first failed target.
      HELP: Run 'make doctor' to diagnose build problems.

      make[1]: *** [/home/dlunden/jdk/open/make/Init.gmk:323: main] Error 2
      make: *** [/home/dlunden/jdk/open/make/Init.gmk:189: hotspot] Error 2
      ```

            Unassigned Unassigned
            dlunden Daniel Lunden
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: