RFR(M): 8140594: Various minor code improvements (compiler)
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Fri May 6 08:01:01 UTC 2016
Hi,
I did a final Coverity run on the jdk9 sources, and would like to fix the
findings detailed below.
Please review this change. I please need a sponsor.
http://cr.openjdk.java.net/~goetz/wr16/8140594-covCo/webrev.00/index.html
Best regards,
Goetz.
os_linux.cpp
- Buffer not null terminated
- size of pointer passed to jio_snprintf()
os_linux_x86.cpp
- wrong size passed, scaled automatically by C compiler.
dfa.cpp/formssel./cpp
- no real issues as this is a tool, but nevertheless...
c1_LinearScan.cpp
- Access with negative index if called with any_reg
- Coverity doesn't grok that two calls to base_counter(i) result in same value.
ciMethodBlocks.cpp
- Out of bounds access
classFileParser.cpp
- Don't access array at BAD_ALLOCATION_TYPE, oob.
- CHECK macro results in two statements, second is not in if body.
classLoader.cpp
- jio_snprintf does null termination. But it might return -1 if truncated,
in this case array access at -1.
systemDictionary.cpp
- avoid %s in message text.
compileBroker.cpp
-_last_method_compiled is an array, not a pointer.
compileLog.cpp
- buffer not null terminated
disassembler.cpp
- lib_offset might be -1.
logTagSet.cpp
- possible buffer overrun
constantPool.cpp
- flagts not initialized
generateOopMap.cpp
- Remaining fields not initialized.
block.cpp
- assertion assigns instead of comparing.
callnode.cpp
-_bci not initialized.
graphKit.cpp
- assertion assings instead of comparing
matcher.cpp
- find_receiver might return any_reg
relocator.cpp
- delta might be -4 ... assert returns.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160506/20045ca6/attachment-0001.html>
More information about the hotspot-compiler-dev
mailing list