RFR: 8292312: Work around memset() called operator new
Ioi Lam
iklam at openjdk.org
Thu Aug 18 22:30:25 UTC 2022
On Thu, 18 Aug 2022 21:53:05 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
> Thumbs up. I agree that the changes are textually trivial and I see how you are working around the bug with value initialization. My brain keeps wondering how GCC 11 could be getting that wrong, but I know that you've already proven that it does.
>
> Very nice hunt!
I think the bug has always been there (Undefined Behavior in our code) but for some reason all the C compilers emitted code that we wanted. With my change in #9849, GCC 11 suddenly emits code that's still compliant to the C++ spec but not what we wanted (memset called after operator-new).
-------------
PR: https://git.openjdk.org/jdk/pull/9927
More information about the hotspot-dev
mailing list