Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8316468

os::write incorrectly handles partial write

XMLWordPrintable

    • 21
    • b16
    • Not verified

        JDK-8303942 introduced a bug in os::write() in os.cpp for handling partial write:
        ```
        buf = (void *)((char *)buf + nBytes);
        ```
        should be

        ```
        buf = (void *)((char *)buf + res);
        ```

        We observed that in JDK 21, heap dump corruption observed in JDK-8303937 happens again when writing to a socket or pipe.

              manc Man Cao
              manc Man Cao
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: