RFR(XXS): 8242485: Null _file checking in fileStream::flush()
xxinliu at amazon.com
Fri Apr 10 17:15:11 UTC 2020
LGTM. (I am not reviewer).
I just realize that fflush accepts NULL, but "If the stream argument is NULL, fflush() flushes all open output streams."
Although it doesn't cause runtime error, it may cause unexpected IO latency.
On 4/10/20, 5:36 AM, "hotspot-dev on behalf of Denghui Dong" <hotspot-dev-bounces at openjdk.java.net on behalf of denghui.ddh at alibaba-inc.com> wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Could you please review this small patch?
I found the method "fileStream::flush()" lacks null check before fflush which will cause
all open output streams are flushed by fflush() if _file is NULL.
More information about the hotspot-runtime-dev