RFR(S): 8165439: Convert Test_TempNewSymbol to GTest

David Holmes david.holmes at oracle.com
Mon Sep 5 23:55:58 UTC 2016


Hi Kirill,

On 6/09/2016 3:37 AM, Kirill Zhaldybin wrote:
> Dear all,
>
> Could you please review this fix for 8165439?
>
> WebRev: http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8165439/webrev.00/
> CR: https://bugs.openjdk.java.net/browse/JDK-8165439

Conversion seems fine but I have to admit I'm baffled by the final test:

  70   Symbol* xyz = SymbolTable::new_symbol("xyz", CATCH);
   71   int xyzcount = xyz->refcount();
   72   { // inner scope
   73     TempNewSymbol s_inner = xyz;
   74   }
   75   ASSERT_EQ(xyz->refcount(), xyzcount - 1)
   76           << "Should have been decremented by dtor in inner scope";

this appears to expect a refcount of zero even though we still have the 
original reference. I guess I have no idea how this TempNewSymbol ref 
counting works :)

Cheers,
David


> Thank you.
>
> Regards, Kirill


More information about the hotspot-runtime-dev mailing list