Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8207294 | 12 | Goetz Lindenmaier | P3 | Resolved | Fixed | b03 |
JDK-8207501 | 11.0.2 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
JDK-8207612 | 11.0.1 | Goetz Lindenmaier | P3 | Resolved | Fixed | b02 |
I ran coverity on the jdk11 hotspot sources and want to propose the following fixes. I scanned the linux x86_64 build. Some issues are similar to previous parfait fixes (check for NULL, add guarantees etc.) I also identified some issues I consider real problems:
Real issues:
------------
jvmtiEnvBase.cpp
|| should be &&.
Attention, this is the only change that really will change behaviour.
But if thr == NULL we will see a crash below.
perfMemory_linux.cpp:
Wrong buffer length used.
systemDictionary.cpp:
Move code dereferencing ik under if (ik != NULL).
virtualspace.cpp
Initialization is missing. Moved constructor up to the other
constructors.
Useful code improvements:
-------------------------
vm_version_ext_x86.cpp
Assure buffer is not accessed at offset -1.
os_linux.cpp
Numa_max_node returns int, and a -1 in some cases.
moduleEntry.cpp
name might be NULL. Just a fix for tracing.
systemDictionaryShared.cpp
clearify code.
It would be wrong if only entry == NULL would hold, one
would hit the assertion below.
verifier.cpp
Fix tracing.
Illegal opcode is -1 and should not be passed to name array.
logOutput.cpp
If n_selections == 0, best_selection would be NULL.
Move up the assertion and turn into a guarantee.
filemap.cpp
Either base can be NULL, or parts of the code before are dead.
metaspace.cpp
We now an exception is pending.
klassVtable.cpp
Coverity does not like the format in a variable.
Anyways this is quite rough coding, transformed to use stringStream
as with other similar exceptions.
jvmFlag.cpp
match might be NULL.
writableFlags.cpp
name might be NULL.
ostream.cpp
If ftell returns error code -1, we need not continue.
Especially we should not fseek(-1).
logTestUtils.inline.hpp
ftell returns -1.
test_metachunk.cpp
wrong datatype.
Real issues:
------------
jvmtiEnvBase.cpp
|| should be &&.
Attention, this is the only change that really will change behaviour.
But if thr == NULL we will see a crash below.
perfMemory_linux.cpp:
Wrong buffer length used.
systemDictionary.cpp:
Move code dereferencing ik under if (ik != NULL).
virtualspace.cpp
Initialization is missing. Moved constructor up to the other
constructors.
Useful code improvements:
-------------------------
vm_version_ext_x86.cpp
Assure buffer is not accessed at offset -1.
os_linux.cpp
Numa_max_node returns int, and a -1 in some cases.
moduleEntry.cpp
name might be NULL. Just a fix for tracing.
systemDictionaryShared.cpp
clearify code.
It would be wrong if only entry == NULL would hold, one
would hit the assertion below.
verifier.cpp
Fix tracing.
Illegal opcode is -1 and should not be passed to name array.
logOutput.cpp
If n_selections == 0, best_selection would be NULL.
Move up the assertion and turn into a guarantee.
filemap.cpp
Either base can be NULL, or parts of the code before are dead.
metaspace.cpp
We now an exception is pending.
klassVtable.cpp
Coverity does not like the format in a variable.
Anyways this is quite rough coding, transformed to use stringStream
as with other similar exceptions.
jvmFlag.cpp
match might be NULL.
writableFlags.cpp
name might be NULL.
ostream.cpp
If ftell returns error code -1, we need not continue.
Especially we should not fseek(-1).
logTestUtils.inline.hpp
ftell returns -1.
test_metachunk.cpp
wrong datatype.
- backported by
-
JDK-8207294 Minor improvements of runtime code.
-
- Resolved
-
-
JDK-8207501 Minor improvements of runtime code.
-
- Resolved
-
-
JDK-8207612 Minor improvements of runtime code.
-
- Resolved
-