RFR(M): 8140594: Various minor code improvements (compiler)
goetz.lindenmaier at sap.com
Fri May 6 08:01:01 UTC 2016
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.
- Buffer not null terminated
- size of pointer passed to jio_snprintf()
- wrong size passed, scaled automatically by C compiler.
- no real issues as this is a tool, but nevertheless...
- Access with negative index if called with any_reg
- Coverity doesn't grok that two calls to base_counter(i) result in same value.
- Out of bounds access
- Don't access array at BAD_ALLOCATION_TYPE, oob.
- CHECK macro results in two statements, second is not in if body.
- jio_snprintf does null termination. But it might return -1 if truncated,
in this case array access at -1.
- avoid %s in message text.
-_last_method_compiled is an array, not a pointer.
- buffer not null terminated
- lib_offset might be -1.
- possible buffer overrun
- flagts not initialized
- Remaining fields not initialized.
- assertion assigns instead of comparing.
-_bci not initialized.
- assertion assings instead of comparing
- find_receiver might return any_reg
- delta might be -4 ... assert returns.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev