RFR(M): 8183227: read/write APIs in class os shall return ssize_t
christoph.langer at sap.com
Mon Jul 3 07:36:20 UTC 2017
Ping: Any comments on this change...?
From: Langer, Christoph
Sent: Donnerstag, 29. Juni 2017 12:50
To: hotspot-runtime-dev at openjdk.java.net
Subject: RFR(M): 8183227: read/write APIs in class os shall return ssize_t
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-dev