RFR(M): 8183227: read/write APIs in class os shall return ssize_t
christoph.langer at sap.com
Thu Jun 29 10:49:40 UTC 2017
please review the following change:
When looking at the read() and write() APIs and its siblings on the platforms, you find the return value mostly being of signed type ssize_t vs. the current unsigned return type size_t of the methods in class os. With my proposed patch I try to address that and change the signatures of these methods to ssize_t.
At the places where the methods were called so far, I could find 2 places where usage of the wrong type could be critical:
src/share/vm/compiler/compileLog.cpp (where actually ::read is used) and
src/share/vm/compiler/directivesParser.cpp where a wrong array access could happen
As for the class os, I'm wondering if the methods "read_at" and "restartable_read" are still required? My source code scan tells me that there are no users of them. Shall I maybe remove them completely from the code?
Thanks & Best regards
More information about the hotspot-runtime-dev