RFR: 8232084: HotSpot build failed with GCC 9.2.1

Yasumasa Suenaga suenaga at oss.nttdata.com
Thu Oct 10 07:42:47 UTC 2019


On 2019/10/10 16:25, serguei.spitsyn at oracle.com wrote:
> On 10/9/19 23:39, Chris Plummer wrote:
>> I think the +1 gets rid of the warning, but it also means there is no need for the following line that sets buf[len].
> 
> Yes, it was my guess.
> Then I agree this statement must be removed: buf[len] = '\0';

I uploaded new webrev. It removes "buf[len] = '\0';"

   http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.01/


Thanks,

Yasumasa


> Thanks,
> Serguei
> 
> 
>>
>> Chris
>>
>> On 10/9/19 11:31 PM, serguei.spitsyn at oracle.com wrote:
>>> Hi Yasumasa,
>>>
>>> The fix in src/hotspot/cpu/x86/macroAssembler_x86.hpp looks Okay.
>>>
>>> But I don't understand why you need this fix in src/hotspot/share/services/diagnosticArgument.cpp ?:
>>>         char* buf = NEW_RESOURCE_ARRAY(char, len + 1);
>>> - strncpy(buf, str, len);
>>> + strncpy(buf, str, len + 1);
>>>         buf[len] = '\0';
>>> The buf[len] is set to '\0' anyway.
>>>
>>> Thanks,
>>> Serguei
>>>
>>>
>>> On 10/9/19 22:55, Yasumasa Suenaga wrote:
>>>> Hi all,
>>>>
>>>> Please review this change:
>>>>
>>>>   JBS: https://bugs.openjdk.java.net/browse/JDK-8232084
>>>>   webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.00/
>>>>
>>>>
>>>> I tried to build OpenJDK on Fedora 30 x64 with GCC 9.2.1, but it was failed in
>>>> macroAssembler_x86.hpp and diagnosticArgument.cpp .
>>>> (Please see JBS for details)
>>>>
>>>> This change has passed tests on submit repo.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Yasumasa (ysuenaga)
>>>
>>
>>
> 


More information about the hotspot-compiler-dev mailing list