[jdk17u-dev] RFR: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer [v2]
Todd V. Jonker
duke at openjdk.org
Tue Aug 13 20:38:03 UTC 2024
> Backports a fix for a potential data-loss defect from JDK19 to JDK17.
>
> This change is not clean, but the conflict is minimal and localized to `StreamDecoder.java`.
>
> Viewing this diff alongside the original fix [here](https://github.com/openjdk/jdk/commit/6520843f86f638fe4d1e5b3358fab5799daca654?diff=unified&w=0#diff-e720d7662e29697b70409dd2aae7864f4e89d4bec33aa8d2ffce83cab365115eR184-R227) and expanding context upward a bit should be illuminating. The conflict is due to structural/indentation difference when the lock acquisition at L158 was hoisted into a separate method. That happened [here](https://github.com/openjdk/jdk/commit/9583e3657e43cc1c6f2101a64534564db2a9bd84?diff=unified&w=1#diff-e720d7662e29697b70409dd2aae7864f4e89d4bec33aa8d2ffce83cab365115eL154-L190) (wherein this file has an ugly diff obscuring relatively simple changes).
>
> Additional testing:
> - [x] New regression test fails without the fix, passes with it
> - [x] linux-x86_64-server-release: `JTREG_KEYWORDS="!headful & !external-dep & !printer" make test` (tier1-3)
Todd V. Jonker has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'master' into inputstreamreader for testing
- Backport 6520843f86f638fe4d1e5b3358fab5799daca654
-------------
Changes:
- all: https://git.openjdk.org/jdk17u-dev/pull/2726/files
- new: https://git.openjdk.org/jdk17u-dev/pull/2726/files/b8bfb9cf..cbc13988
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2726&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2726&range=00-01
Stats: 7641 lines in 180 files changed: 5963 ins; 1006 del; 672 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/2726.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2726/head:pull/2726
PR: https://git.openjdk.org/jdk17u-dev/pull/2726
More information about the jdk-updates-dev
mailing list