On Thu, 11 Jul 2024 08:36:23 GMT, Julian Waters wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Component.cpp line 3365:
>>
>>> 3363: }
>>> 3364: static void
>>> 3365: resetKbdState(BYTE (&kstate) [AwtToolkit::KB_STATE_SIZE]) {
>>
>> I don't know what is most used syntax for this t
On Thu, 11 Jul 2024 08:36:54 GMT, Julian Waters wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Component.cpp line 3368:
>>
>>> 3366: BYTE tmpState[AwtToolkit::KB_STATE_SIZE];
>>> 3367: WCHAR wc[2];
>>> 3368: memmove(tmpState, kstate, sizeof (kstate));
>>
>> Suggestion:
On Thu, 4 Jul 2024 12:59:48 GMT, Alexey Ivanov wrote:
>> Julian Waters 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 five additional
>> commit
On Wed, 3 Jul 2024 13:34:38 GMT, Julian Waters wrote:
>> In [JDK-8302671](https://bugs.openjdk.org/browse/JDK-8302671) I fixed a
>> memmove decay bug by rewriting a sizeof on an array to an explicit size of
>> 256, but this is a bit of a band aid fix. It's come to my attention that in
>> C++,
On Thu, 4 Jul 2024 13:15:28 GMT, Thomas Stuefe wrote:
> Using memmove is so uncommon that it is usually a clear indication for a
> deliberate choice.
It may still be an accidental choice. I didn't find any code review for
[JDK-6680988](https://bugs.openjdk.org/browse/JDK-6680988) where this li
On Wed, 3 Jul 2024 13:34:38 GMT, Julian Waters wrote:
>> In [JDK-8302671](https://bugs.openjdk.org/browse/JDK-8302671) I fixed a
>> memmove decay bug by rewriting a sizeof on an array to an explicit size of
>> 256, but this is a bit of a band aid fix. It's come to my attention that in
>> C++,
On Wed, 3 Jul 2024 13:34:38 GMT, Julian Waters wrote:
>> In [JDK-8302671](https://bugs.openjdk.org/browse/JDK-8302671) I fixed a
>> memmove decay bug by rewriting a sizeof on an array to an explicit size of
>> 256, but this is a bit of a band aid fix. It's come to my attention that in
>> C++,
On Wed, 3 Jul 2024 13:25:27 GMT, Julian Waters wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Component.cpp line 3368:
>>
>>> 3366: BYTE tmpState[256];
>>> 3367: WCHAR wc[2];
>>> 3368: memmove(tmpState, kstate, sizeof(kstate));
>>
>> Using `memcpy` could be more perfor
> In [JDK-8302671](https://bugs.openjdk.org/browse/JDK-8302671) I fixed a
> memmove decay bug by rewriting a sizeof on an array to an explicit size of
> 256, but this is a bit of a band aid fix. It's come to my attention that in
> C++, one can pass an array by reference, which causes sizeof to w