RFR: 8334599: Improve code from JDK-8302671 [v2]
Julian Waters
jwaters at openjdk.org
Wed Jul 3 13:34:38 UTC 2024
> 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 work correctly on an array and has the added bonus of enforcing an array of that size on the arguments passed to that method. I've reverted my change from 8302671 and instead explicitly made kstate an array reference so that sizeof works on the array as expected, and that the array size can be explicitly set in the array brackets
>
> Verification: https://godbolt.org/z/Ezj76eWWY and GitHub Actions
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 commits since the last revision:
- Formatting sizeof awt_Component.cpp
- Formatting awt_Component.cpp
- Merge branch 'openjdk:master' into patch-10
- Update src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
Co-authored-by: Alexey Ivanov <alexey.ivanov at oracle.com>
- 8334599
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19798/files
- new: https://git.openjdk.org/jdk/pull/19798/files/8f5f3088..b98068e9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19798&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19798&range=00-01
Stats: 19745 lines in 608 files changed: 11255 ins; 6128 del; 2362 mod
Patch: https://git.openjdk.org/jdk/pull/19798.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19798/head:pull/19798
PR: https://git.openjdk.org/jdk/pull/19798
More information about the client-libs-dev
mailing list