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

AArch64: Build failure with clang due to -Wformat-nonliteral warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • hotspot
    • None
    • b23
    • aarch64

      I tested both {release, fastdebug} on {clang-11, clang-12, clang-14, clang-15} + aarch64 + ubuntu-22.04. The following error log would be generated.

      === Output from failing command(s) repeated here ===
      * For target hotspot_variant-server_libjvm_objs_os_linux_aarch64.o:
      ~/jdk_src/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp:266:62: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
              VMError::report_and_die(thread, uc, nullptr, 0, msg, detail_msg, va_dummy);
                                                                                                 ^~~~~~~~~~
      1 error generated.
      * All command lines available in ~/build-fastdebug/make-support/failure-logs.
      === End of repeated output ===

      Note-1: I tested on clang-14+aarch64+macos, and the JDK build can pass.
      Note-2: I think it's a common issue. ppc or riscv should be affected as well. Unfortunately, I didn't have the hardware on hand.

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

              Created:
              Updated:
              Resolved: