RFR: 8213481: [REDO] Fix incorrect copy constructors in hotspot

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Mon Nov 19 22:54:28 UTC 2018

Looks good to me.

On 11/19/18 1:14 AM, Kim Barrett wrote:
> Please review this fix of the debug-only copy constructor and
> assignment operator for ResourceObj, along with adding some missing
> uses of the copy constructor.
> The missing copy constructor uses were found by enabling -Wextra.
> The ResourceObj debug-only copy constructor should behave exactly the
> same as the corresponding default constructor.  That is, the setup for
> checking the allocation state in the destructor and operator delete
> should be the same whether in the normal or copy constructor.  That
> previously wasn't true, resulting in assert failures.
> The ResourceObj assignment operator also should not be assuming the
> target of the assignment was stack/embeded allocated; that's just not
> a valid assumption.  The corresponding assertion has been removed.
> Note that the ResourceObj allocation/construction/deletion code is
> oddly indented, using an initial 4 space indentation and 2 spaces for
> further indenting, unlike the usual consistent 2 space indentation
> used elsewhere in HotSpot, including elsewhere in allocation.cpp.
> I've left that indentation intact to minimize diffs in some views for
> review.  Unless there are objections, I plan to fix the indentation.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8213481
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8213481/open.00/
> Testing:
> mach5 tier1-3.  There were many failures in these tiers with just the
> addition of the missing copy constructor calls (JDK-8213414).

More information about the hotspot-dev mailing list