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

AArch64: fastdebug build failure with GCC 12 and 13 due to -Wnonnull warning in vm_version_linux_aarch64.cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 22
    • hotspot
    • aarch64

      Test environment: gcc 12.3.0 + Ubuntu 22.04

      Only fastdebug build fails. (release build passed. gcc-11+fastdebug passed as well).


      Error log:

      === Output from failing command(s) repeated here ===
      * For target hotspot_variant-server_libjvm_objs_vm_version_linux_aarch64.o:
      In file included from /usr/include/features.h:486,
                        from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,
                        from /usr/include/stdint.h:26,
                        from /usr/lib/gcc/aarch64-linux-gnu/12/include/stdint.h:9,
                        from ~/jdk_src/src/hotspot/share/utilities/debug.hpp:34,
                        from ~/jdk_src/src/hotspot/share/memory/allocation.hpp:29,
                        from ~/jdk_src/src/hotspot/share/classfile/classLoaderData.hpp:28,
                        from ~/jdk_src/src/hotspot/share/precompiled/precompiled.hpp:34:
       In function 'ssize_t read(int, void*, size_t)',
            inlined from 'bool read_fully(const char*, char*, size_t)' at ~/jdk_src/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp:188:29,
            inlined from 'static void VM_Version::get_compatible_board(char*, int)' at ~/jdk_src/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp:218:19:
        /usr/include/aarch64-linux-gnu/bits/unistd.h:38:10: error: argument 2 is null but the corresponding size argument 3 value is [1, 18446744073709551615] [-Werror=nonnull]
           38 | return __glibc_fortify (read, __nbytes, sizeof (char),
              | ^~~~~~~~~~~~~~~
        /usr/include/aarch64-linux-gnu/bits/unistd.h: In static member function 'static void VM_Version::get_compatible_board(char*, int)':
           ... (rest of output omitted)
        
        * All command lines available in ~/build-fastdebug/make-support/failure-logs.
        === End of repeated output ===

            Unassigned Unassigned
            haosun Hao Sun (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: