RFR: 8292312: Work around memset() called operator new

Daniel D. Daugherty dcubed at openjdk.org
Thu Aug 18 21:56:36 UTC 2022


On Thu, 18 Aug 2022 20:15:31 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> Please review this trivial fix. It blocks my integration for #9849:
> - Do not value-initialize the PtrList and PtrTable in the Synchronizer class
> - Use a non-default constructor for FixedResourceHashtableStorage
> 
> It seems like the problem is always there, but GCC 11 would get tipped the wrong way when I moved the ObjectMonitorsHashtable() constructor from the hpp file to the cpp file in #9849.
> 
> I want to make this change independent of  #9849 so it can be reviewed separately, and could be backported more easily when necessary.

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!

-------------

Marked as reviewed by dcubed (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9927


More information about the hotspot-dev mailing list