-
Bug
-
Resolution: Fixed
-
P4
-
17, 19
-
b25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8341808 | 17.0.14-oracle | Fairoz Matte | P4 | Resolved | Fixed | b02 |
JDK-8301101 | 17.0.7 | Yasumasa Suenaga | P4 | Resolved | Fixed | b01 |
* -Wstringop-overflow
* src/hotspot/share/oops/array.hpp
* src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp
```
In member function 'void Array<T>::at_put(int, const T&) [with T = unsigned char]',
inlined from 'void ConstantPool::tag_at_put(int, jbyte)' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/oops/constantPool.hpp:126:64,
inlined from 'void ConstantPool::method_at_put(int, int, int)' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/oops/constantPool.hpp:380:15,
inlined from 'ConstantPool* BytecodeConstantPool::create_constant_pool(JavaThread*) const' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/classfile/bytecodeAssembler.cpp:85:26:
/home/ysuenaga/github-forked/jdk/src/hotspot/share/oops/array.hpp:119:114: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
119 | void at_put(const int i, const T& x) { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); _data[i] = x; }
| ~~~~~~~~~^~~
In file included from /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp:33,
from /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp:30,
from /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp:30:
In function 'void set_form(jbyte, jbyte*) [with jbyte (* op)(jbyte, jbyte) = traceid_or]',
inlined from 'void set(jbyte, jbyte*)' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp:129:23,
inlined from 'static void JfrTraceIdBits::store(jbyte, const T*) [with T = Klass]' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp:135:6,
inlined from 'static void JfrTraceId::tag_as_jdk_jfr_event(const Klass*)' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp:106:3,
inlined from 'static void JdkJfrEvent::tag_as(const Klass*)' at /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp:176:35:
/home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp:99:9: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
99 | *dest = op(bits, *dest);
| ~~~~~~^~~~~~~~~~~~~~~~~
```
* -Wformat-overflow
* src/hotspot/share/opto/memnode.cpp
```
/home/ysuenaga/github-forked/jdk/src/hotspot/share/opto/memnode.cpp: In member function 'Node* LoadNode::eliminate_autobox(PhaseIterGVN*)':
/home/ysuenaga/github-forked/jdk/src/hotspot/share/opto/memnode.cpp:1409:53: error: '%s' directive argument is null [-Werror=format-overflow=]
1409 | bt == T_INT || bt == T_LONG, "wrong type = %s", type2name(bt));
| ^~~~~~~~~~~~~~~~~
```
* -Wformat-truncation
* src/java.base/unix/native/libjli/java_md_common.c
```
/home/ysuenaga/github-forked/jdk/src/java.base/unix/native/libjli/java_md_common.c: In function 'Resolve':
/home/ysuenaga/github-forked/jdk/src/java.base/unix/native/libjli/java_md_common.c:132:43: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size between 2 and 4097 [-Werror=format-truncation=]
132 | JLI_Snprintf(name, sizeof(name), "%s%c%s", indir, FILE_SEPARATOR, cmd);
| ^~
```
* -Waddress
* src/java.base/share/native/libjli/java.c
```
/home/ysuenaga/github-forked/jdk/src/java.base/share/native/libjli/java.c:1629:35: error: the comparison will always evaluate as 'false' for the pointer operand in 'arg + 2' must not be NULL [-Werror=address]
1629 | *nargv++ = ((arg + 2) == NULL) ? NULL : JLI_StringDup(arg + 2);
|
```
* -Wuse-after-free
* src/java.base/share/native/libjli/parse_manifest.c
* src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c
* src/java.desktop/share/native/libharfbuzz/hb-font.cc
```
/home/ysuenaga/github-forked/jdk/src/java.base/share/native/libjli/parse_manifest.c:292:34: error: pointer 'endpos' used after 'free' [-Werror=use-after-free]
292 | pos = flen - (endpos - cp);
| ~~~~~~~~^~~~~
/home/ysuenaga/github-forked/jdk/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c:180:63: error: pointer 'strBufBegin' may be used after 'realloc' [-Werror=use-after-free]
180 | strBufNextChar = strNewBufBegin + (strBufNextChar - strBufBegin);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libharfbuzz/hb-font.cc:2286:12: error: pointer 'trampoline' used after 'void free(void*)' [-Werror=use-after-free]
2286 | closure->ref_count++;
| ~~~~~~~~~^~~~~~~~~
```
Most of warnings can be ignored, however warnings for libjli seem to be bugs.
- backported by
-
JDK-8301101 GCC 12 reports some compiler warnings
- Resolved
-
JDK-8341808 GCC 12 reports some compiler warnings
- Resolved
- relates to
-
JDK-8286694 Incorrect argument processing in java launcher
- Resolved
-
JDK-8286705 GCC 12 reports use-after-free potential bugs
- Resolved
-
JDK-8288048 Build failure with GCC 6 after JDK-8286562
- Resolved
-
JDK-8287491 compiler/jvmci/errors/TestInvalidDebugInfo.java fails new assert: assert((uint)t < T_CONFLICT + 1) failed: invalid type #
- Closed
-
JDK-8336460 [8u] GCC13 report compile warning concurrentMark.cpp:2939:26: error: ā%sā directive writing up to 4095 bytes into a region of size between 1 and 4096
- Open
- links to
-
Commit openjdk/jdk17u-dev/46c1434d
-
Commit openjdk/jdk/410a25d5
-
Review openjdk/jdk17u-dev/1087
-
Review openjdk/jdk/8646