On Thu, 12 May 2022 14:56:47 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
On Thu, 12 May 2022 14:15:43 GMT, Daniel Fuchs wrote:
>>> OK - I will change codeLengthOf as suggested. It was not immediately
>>> obvious to me that the values would fit in the first 31 bits.
>>
>> In fact, it would even fit into the first 30 bits. There's a top-level
>> comment that explains
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Typo
On Thu, 12 May 2022 14:25:44 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Move assert
-
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Pavel's feedba
On Thu, 12 May 2022 11:41:04 GMT, Pavel Rappo wrote:
>> OK - I will change codeLengthOf as suggested. It was not immediately
>> obvious to me that the values would fit in the first 31 bits.
>
>> OK - I will change codeLengthOf as suggested. It was not immediately obvious
>> to me that the valu
On Thu, 12 May 2022 10:51:04 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
On Thu, 12 May 2022 10:05:14 GMT, Daniel Fuchs wrote:
> OK - I will change codeLengthOf as suggested. It was not immediately obvious
> to me that the values would fit in the first 31 bits.
In fact, it would even fit into the first 30 bits. There's a top-level comment
that explains the layout o
On Thu, 12 May 2022 10:08:23 GMT, Daniel Fuchs wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java
>> line 291:
>>
>>> 289:
>>> 290: HeaderWriter noMask() {
>>> 291: // The negation "~" sets the high order bits
>>
>> Rubber-stamping this in
On Thu, 12 May 2022 10:51:04 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
lengthOfCode()
On Thu, 12 May 2022 09:15:19 GMT, Pavel Rappo wrote:
>> Daniel Fuchs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Revert adding char constants
>
> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java
> line 291:
On Thu, 12 May 2022 09:00:37 GMT, Pavel Rappo wrote:
>> This is what I mean:
>>
>> jshell> long codeLengthOf = (long)Integer.MAX_VALUE + 1
>> codeLengthOf ==> 2147483648
>>
>> jshell> int bufferLen = 0
>> bufferLen ==> 0
>>
>> jshell> bufferLen + codeLengthOf <= 64
>> $3 ==> false
>>
>> jshel
On Wed, 11 May 2022 18:42:46 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
On Thu, 12 May 2022 08:56:26 GMT, Daniel Fuchs wrote:
>> No because the int returned could be negative, while the long will not.
>> Assuming bufferLen is 0 and codeLengthOf() returns some value that has the
>> 32th bit set to 1 then when codeLengthOf() returns long, bufferLen +
>> codeLengthOf
On Thu, 12 May 2022 08:42:39 GMT, Daniel Fuchs wrote:
>> codeLengthOf() returns long. It could be changed to return int with a cast
>> internally and then you could avoid the two new casts.
>
> No because the int returned could be negative, while the long will not.
> Assuming bufferLen is 0 and
On Wed, 11 May 2022 20:31:00 GMT, Michael McMahon wrote:
>> I believe the method returns an "unsigned int" - having the method return an
>> int would then potentially cause `bufferLen + len <= 64` to yield true when
>> it shouldn't. Hopefully @pavelrappo will comment.
>
> codeLengthOf() returns
On Wed, 11 May 2022 17:10:45 GMT, Daniel Fuchs wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/hpack/QuickHuffman.java
>> line 739:
>>
>>> 737: buffer |= (codeValueOf(c) >>> bufferLen); //
>>> append
>>> 738: bufferLen += (int) le
On Wed, 11 May 2022 18:33:44 GMT, Daniel Fuchs wrote:
>> So if x is a char, ~x seems to be an int :-(
>
> I have reverted adding constant fields. Too bad - the casts are back.
Phooey: Sorry to have lead you astray. :(
And casting before `~` does the same not wanted result.
-
PR:
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Revert adding
On Wed, 11 May 2022 18:25:00 GMT, Daniel Fuchs wrote:
>> @RogerRiggs Actually - I'm no longer sure that this will work:
>>
>>
>> jshell> char x = 0b1000_
>> x ==> '耀'
>>
>> jshell> var y = ~x
>> y ==> -32769
>>
>> jshell> char y = ~x
>> | Error:
>> | incompatible types: possible
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Revert adding
On Wed, 11 May 2022 18:23:30 GMT, Daniel Fuchs wrote:
>> 👍 I'd put `_MASK` in the name along with whatever name is used for the bits
>> in the frame spec .
>
> @RogerRiggs Actually - I'm no longer sure that this will work:
>
>
> jshell> char x = 0b1000_
> x ==> '耀'
>
> jshell> var
On Wed, 11 May 2022 17:49:28 GMT, Roger Riggs wrote:
>> Ah! Good point. Maybe I should use a constant and get rid of the cast.
>
> 👍 I'd put `_MASK` in the name along with whatever name is used for the bits
> in the frame spec .
@RogerRiggs Actually - I'm no longer sure that this will work:
j
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Add _MASK suff
On Wed, 11 May 2022 17:49:28 GMT, Roger Riggs wrote:
>> Ah! Good point. Maybe I should use a constant and get rid of the cast.
>
> 👍 I'd put `_MASK` in the name along with whatever name is used for the bits
> in the frame spec .
Done
-
PR: https://git.openjdk.java.net/jdk/pull/865
On Wed, 11 May 2022 18:02:32 GMT, Daniel Fuchs wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> Daniel Fuchs has updated the pull request incrementally with one
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
Daniel Fuchs has updated the pull request incrementally with one additional
commit since the last revision:
Use char const
On Wed, 11 May 2022 17:37:44 GMT, Roger Riggs wrote:
>> Yes - that's my understanding.
>
> These methods either set or clear a single bit in `firstChar`.
> The constant is an `int` so its complement is a 32 bit int.
>
> It could also be written as `~ (char) 0b100_000`. Then the 16 bit
On Wed, 11 May 2022 17:46:15 GMT, Daniel Fuchs wrote:
>> These methods either set or clear a single bit in `firstChar`.
>> The constant is an `int` so its complement is a 32 bit int.
>>
>> It could also be written as `~ (char) 0b100_000`. Then the 16 bit
>> unsigned char would be comp
On Wed, 11 May 2022 17:04:19 GMT, Daniel Fuchs wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java
>> line 222:
>>
>>> 220: // compiler will emit a warning if not cast
>>> 221: firstChar &= (char) ~0b1000_;
>>> 222:
On Wed, 11 May 2022 16:52:07 GMT, Michael McMahon wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> src/java.net.http/share/classes/jdk/internal/net/http/hpack/Q
On Wed, 11 May 2022 16:55:16 GMT, Michael McMahon wrote:
>> In relation to
>> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
>> here a patch that addresses possibly lossy conversions in java.net.http
>
> src/java.net.http/share/classes/jdk/internal/net/http/websock
On Wed, 11 May 2022 15:42:25 GMT, Daniel Fuchs wrote:
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
src/java.net.http/share/classes/jdk/internal/net/http/hpack/QuickHuffm
On Wed, 11 May 2022 15:42:25 GMT, Daniel Fuchs wrote:
> In relation to
> [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find
> here a patch that addresses possibly lossy conversions in java.net.http
@pavelrappo I would appreciate if you could review these changes
In relation to [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681),
please find here a patch that addresses possibly lossy conversions in
java.net.http
-
Commit messages:
- Fix comments
- 8286386: Address possibly lossy conversions in java.net.http
Changes: https://gi
37 matches
Mail list logo