RFR: 8302671: libawt has a memmove decay error
Julian Waters
jwaters at openjdk.org
Fri Feb 17 14:07:25 UTC 2023
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> In libawt, the size parameter is issued by a sizeof on an array, which as expected decays into a pointer and breaks the cleanup code by giving the incorrect size
Looking back at this now, I wonder if we should also have changed the parameter from `kstate[256]` to `*kstate` instead, to make it clear that C++ cannot pass an array like this and that the type of kstate is a pointer and not an array, to avoid the misconception that you can use sizeof on it
-------------
PR: https://git.openjdk.org/jdk/pull/12597
More information about the client-libs-dev
mailing list