[jdk17u-dev] RFR: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer [v2]

duke duke at openjdk.org
Fri Aug 30 00:29:20 UTC 2024


On Tue, 13 Aug 2024 20:38:03 GMT, Todd V. Jonker <duke at openjdk.org> wrote:

>> 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

@toddjonker 
Your change (at version cbc1398810aa928440e8f5f89c9e6ab212f76259) is now ready to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2726#issuecomment-2319539654


More information about the jdk-updates-dev mailing list