RFR(S): 8165439: Convert Test_TempNewSymbol to GTest
Kirill Zhaldybin
kirill.zhaldybin at oracle.com
Tue Sep 6 19:02:04 UTC 2016
David,
Thank you for reviewing the test!
On 06.09.2016 02:55, David Holmes wrote:
> 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 :)
I do not understand why it was implemented this way too but:
1. It was in VM internal test I did not change this part
2. The test works according the TempNewSymbol code which does not
increase reference count if TempNewSymbol was created using default
c-tor and then assigned with Symbol.
I filed https://bugs.openjdk.java.net/browse/JDK-8165535 on this.
It would be great if someone who is familiar with this code evaluates
this issue.
Thank you.
Regards, Kirill
>
> Cheers,
> David
>
>
>> Thank you.
>>
>> Regards, Kirill
More information about the hotspot-runtime-dev
mailing list