RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Tue Dec 6 13:12:30 UTC 2016


This change fixes some minor issues found in our code scans.
I hope this correctly addresses corelib and serviceability issues.

Please review:

Best regards,

Changes in detail:


Code scan reports missing {}.

The code "if (huge+x>one) {" is only there to set the inexact flag of the processor.
It's a way to avoid the C compiler to optimize the code away. It is always true,
so the parenthesis of the outer else don't matter.

Although this basically just adds the {} I would like to submit this to
avoid anybody else spends more the 30sec on understanding these
if statements.


exc.retval is returned below and thus should always be initialized.


Wrong destructor is used.  Reported also by David CARLIER


in line 1865 'name' was used, it should be 'alias'.


"//" in path is useless. Further down a free is missing.


Call to stratumTableIndex can return negative value if defaultStratumId == null.


arg.l_linger is passed to setsockopt uninitialized. Its use is hidden in the macros.


n.slice should not get negative argument for end, which is passed from dollar1.
But dollar1 can get negative where it is set to the result of lastIndexOf(DOLLAR_MIN, DOLLAR_MAX, n, dollar2 - 1).

More information about the core-libs-dev mailing list