Details
-
Bug
-
Resolution: Fixed
-
P4
-
11, 12
-
b23
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8243352 | 11.0.8-oracle | Dmitry Chuyko | P4 | Resolved | Fixed | b04 |
JDK-8243958 | 11.0.8 | Dmitry Chuyko | P4 | Resolved | Fixed | b01 |
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.
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
- backported by
-
JDK-8243352 Wrong strncat limits in dfa.cpp
- Resolved
-
JDK-8243958 Wrong strncat limits in dfa.cpp
- Resolved
- relates to
-
JDK-8213153 Clean up GCC 8 errors
- Closed
-
JDK-8207049 Minor improvements of compiler code.
- Resolved