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

Wrong strncat limits in dfa.cpp

    XMLWordPrintable

Details

    • b23

    Backports

      Description

        GCC 8 reports errors like:

        src/hotspot/share/adlc/dfa.cpp:724:14: error: 'char* strncat(char*, const char*, size_t)' specified bound 2048 equals destination size [-Werror=stringop-overflow=]
               strncat(string_buffer, "+", STRING_BUFFER_LENGTH);

        Both GCC 8 and static check tools can be satisfied by carefully switching from strncat to snprintf.
        It would be nice to use jio_snprintf but adlc should not depend on VM.

        Attachments

          Issue Links

            Activity

              People

                dchuyko Dmitry Chuyko
                dchuyko Dmitry Chuyko
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: