RFR: 8062672: JVM crashes during GC on various asserts which checks that HeapWord ptr is an oop

Bengt Rutisson bengt.rutisson at oracle.com
Thu Dec 11 08:12:13 UTC 2014

Hi Stefan,

With the changes you propose based on Jon's review this looks good to me.


On 12/8/14 3:23 PM, Stefan Johansson wrote:
> Thanks for looking at this Jon,
> On 2014-12-05 23:30, Jon Masamitsu wrote:
>> Stefan,
>> Changes look good.
>> Would you like to explicitly check the return from
>> fgets() against NULL?  Your call.
> I see that all other while(fgets...) checks for != NULL so I will add it.
>> What do you think of an assert after the call to fgets() to
>> check the length of the returned string.
>> assert(strnlen(line, 1023) < 1023, "buffer line[1024] is too small.");
>> Too paranoid?
> I like adding an assert, but using strnlen feels a little paranoid 
> since fgets promise to add '\0' at the end even if the line is longer 
> than the buffer. So I plan to add this assert:
> assert(strlen(line) < sizeof(line) - 1, "buffer line[1024] is too 
> small.");
> Thanks,
> Stefan
>> Reviewed.
>> Jon
>> On 12/5/2014 2:01 AM, Stefan Johansson wrote:
>>> Hi,
>>> Please review this fix for the linux-sparc issue described in:
>>> https://bugs.openjdk.java.net/browse/JDK-8062672
>>> Webrev:
>>> http://cr.openjdk.java.net/~sjohanss/8062672/hotspot.00/
>>> Summary:
>>> This fix is based on 7u-dev because the most linux-sparc testing is 
>>> done for that release and also because it's unclear if we have time 
>>> to move the fix the normal way through 9 and 8u before going into 
>>> 7u. But the main reason is that it would be good to get testing of 
>>> the fix in 7u before porting it to 8u and 9.
>>> The fix it self is fairly simple, after JDK-8029190 was backported 
>>> the condition for disabling UseMemSetInBOT changed from is_niagara() 
>>> to has_blk_init(). This worked well for solaris-sparc but on 
>>> linux-sparc we previously only set the niagara feature bits, so this 
>>> change adds support for detecting blk_init support on linux-sparc.
>>> Testing:
>>> Crashes/asserts was reproducible without the fix and after the fix 
>>> none have been observed. Also verified that UseMemSetInBOT now is 
>>> set to false as it should be.
>>> Thanks,
>>> Stefan

More information about the hotspot-dev mailing list