Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-17 Thread Yasumasa Suenaga
Hi all, I pushed the change: https://hg.openjdk.java.net/jdk/jdk/rev/9f5b92d5a1b2 I hope PRAGMA_STRINGOP_TRUNCATION_IGNORED which introduced in this commit will be used when similar issues occur in future. Thanks for all your help! ありがとう! Yasumasa On 2019/10/17 13:54, Ioi Lam wrote: On

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Ioi Lam
On 10/16/19 9:25 PM, Yasumasa Suenaga wrote: On 2019/10/17 13:21, David Holmes wrote: On 17/10/2019 2:20 pm, Yasumasa Suenaga wrote: On 2019/10/17 12:49, David Holmes wrote: On 17/10/2019 12:45 pm, Yasumasa Suenaga wrote: On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
On 2019/10/17 13:21, David Holmes wrote: On 17/10/2019 2:20 pm, Yasumasa Suenaga wrote: On 2019/10/17 12:49, David Holmes wrote: On 17/10/2019 12:45 pm, Yasumasa Suenaga wrote: On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread David Holmes
On 17/10/2019 2:20 pm, Yasumasa Suenaga wrote: On 2019/10/17 12:49, David Holmes wrote: On 17/10/2019 12:45 pm, Yasumasa Suenaga wrote: On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
On 2019/10/17 12:49, David Holmes wrote: On 17/10/2019 12:45 pm, Yasumasa Suenaga wrote: On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread David Holmes
On 17/10/2019 12:45 pm, Yasumasa Suenaga wrote: On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
On 2019/10/17 11:39, David Holmes wrote: On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread David Holmes
On 17/10/2019 12:19 pm, Yasumasa Suenaga wrote: On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or later. +PRAGMA_DIAG_PUSH

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
On 2019/10/17 9:34, David Holmes wrote: On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or later. +PRAGMA_DIAG_PUSH +PRAGMA_STRINGOP_TRUNCATION_IGNORED     strncpy(buf, str,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread David Holmes
On 17/10/2019 10:07 am, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or later. +PRAGMA_DIAG_PUSH +PRAGMA_STRINGOP_TRUNCATION_IGNORED strncpy(buf, str, len); +PRAGMA_DIAG_POP I'd suggest to

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
Hi Serguei, On 2019/10/17 9:07, serguei.spit...@oracle.com wrote: Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or later. +PRAGMA_DIAG_PUSH +PRAGMA_STRINGOP_TRUNCATION_IGNORED strncpy(buf, str, len); +PRAGMA_DIAG_POP I'd

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Chris Plummer
Looks good. Chris On 10/16/19 4:25 PM, Yasumasa Suenaga wrote: (Re-send email because I could not send original email to serviceability-dev and hotspot-compiler-dev) Hi, We discussed the fix for JDK-8232084 in [1], and I think we should fix it with #pragma. I uploaded new webrev. Could

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread serguei.spit...@oracle.com
Hi Yasumasa, It looks good. One tip: + // This code would be warned as "stringop-truncation" by GCC 8 or later. +PRAGMA_DIAG_PUSH +PRAGMA_STRINGOP_TRUNCATION_IGNORED strncpy(buf, str, len); +PRAGMA_DIAG_POP I'd suggest to place the

RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
Hi, We discussed the fix for JDK-8232084 in [1], and I think we should fix it with #pragma. I uploaded new webrev. Could you review it? JBS: https://bugs.openjdk.java.net/browse/JDK-8232084 webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.03/ This change has passed the

RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-16 Thread Yasumasa Suenaga
(Re-send email because I could not send original email to serviceability-dev and hotspot-compiler-dev) Hi, We discussed the fix for JDK-8232084 in [1], and I think we should fix it with #pragma. I uploaded new webrev. Could you review it? JBS:

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-14 Thread serguei.spit...@oracle.com
Hi Yasumasa, I'm Okay with both A and B-1. Personally, I like the simplicity of A but understand this issue is more broad. Thanks, Serguei On 10/11/19 20:22, Yasumasa Suenaga wrote: Hi, I updated Plan B-1 (#pragma) due to the comment from Chris [1].   A. Use memcpy()   

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-14 Thread Magnus Ihse Bursie
On 2019-10-11 15:38, Yasumasa Suenaga wrote: Hi, Christos commented to B-1. Thanks! clang defines __GNU_C__ , but stringop-truncation is not supported. So I updated Plan B-1. It works fine on my Fedora30 box.   A. Use memcpy()   

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Kim Barrett
> On Oct 11, 2019, at 11:22 PM, Yasumasa Suenaga > wrote: > > Hi, > > I updated Plan B-1 (#pragma) due to the comment from Chris [1]. > > > A. Use memcpy() > http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.02/ > > B-1. Use #pragma >

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Chris Plummer
They both look good to me, so I assume we go with B-1 since that's what Kim prefers. thanks, Chris On 10/11/19 8:22 PM, Yasumasa Suenaga wrote: Hi, I updated Plan B-1 (#pragma) due to the comment from Chris [1].   A. Use memcpy()   

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Yasumasa Suenaga
Hi, I updated Plan B-1 (#pragma) due to the comment from Chris [1]. A. Use memcpy() http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.02/ B-1. Use #pragma http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.B1-pragma.03/ I dropped Plan C (disable

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Yasumasa Suenaga
On 2019/10/12 7:30, Kim Barrett wrote: On Oct 11, 2019, at 3:29 PM, Chris Plummer wrote: Second, can the macros be used just before and after the strncpy reference rather than around the whole function? It would clarify both that the strncpy use has these macros in place and that the macros

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Kim Barrett
> On Oct 11, 2019, at 6:18 PM, Kim Barrett wrote: > Right now it seems to me that -Wstringop-truncation is seriously > buggy, both in the false positive and false negative directions. This > seems to be true at least through 9.x for some recent x. And all of > the occurrences of this warning in

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Kim Barrett
> On Oct 11, 2019, at 3:29 PM, Chris Plummer wrote: > Second, can the macros be used just before and after the strncpy reference > rather than around the whole function? It would clarify both that the strncpy > use has these macros in place and that the macros are there for the strncpy. > As

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Kim Barrett
> On Oct 11, 2019, at 3:29 PM, Chris Plummer wrote: > > Hi Yasumasa, > > A couple of comments on (B). First there is a typo in "stringop-truncatino". > Second, can the macros be used just before and after the strncpy reference > rather than around the whole function? It would clarify both

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Chris Plummer
Hi Yasumasa, A couple of comments on (B). First there is a typo in "stringop-truncatino". Second, can the macros be used just before and after the strncpy reference rather than around the whole function? It would clarify both that the strncpy use has these macros in place and that the macros

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Christos Zoulas
Thanks! That's seems to be a nicer way to fix it, but remember that both gcc and clang define __GNUC__ so I think this patch should be more restrictive: http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.B1-pragma/src/hotspot/share/utilities/compilerWarnings_gcc.hpp.udiff.html

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Christos Zoulas
At NetBSD we decided to change the Makefiles because we compile with both clang and gcc and clang does not have those warnings and it complains about the pragmas. christos > On Oct 11, 2019, at 2:54 AM, David Holmes wrote: > > Yes I prefer: > > D. Use #pragma ... at the callsite to disable

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Yasumasa Suenaga
Hi, Christos commented to B-1. Thanks! clang defines __GNU_C__ , but stringop-truncation is not supported. So I updated Plan B-1. It works fine on my Fedora30 box. A. Use memcpy() http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.02/ B-1. Use #pragma

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Yasumasa Suenaga
Hi, I proposed 3 solutions in [1]. Plan B-1 is #pragma, but HotSpot provides valid macro to compiler. I added stringop-truncation to it [2], and it would work each compilers. Yasumasa [1] https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-October/029580.html [2]

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread David Holmes
On 11/10/2019 10:47 pm, Christos Zoulas wrote: At NetBSD we decided to change the Makefiles because we compile with both clang and gcc and clang does not have those warnings and it complains about the pragmas. Compilers are supposed to ignore pragmas they don't understand. Complaining

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread David Holmes
Yes I prefer: D. Use #pragma ... at the callsite to disable this particular diagnostic. over changing the makefiles. David On 11/10/2019 3:37 pm, Ioi Lam wrote: For diagnosticArgument.cpp, I would prefer adding inline #pragma at only the sites affected (as suggested by David Holmes), with a

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-11 Thread Yasumasa Suenaga
Hi, Thanks for a lot advises! We have following solutions for this issue. I'd like to send RFR again with much consented patch in early next week. A. Use memcpy() http://cr.openjdk.java.net/~ysuenaga/JDK-8232084/webrev.02/ B-1. Use #pragma

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Ioi Lam
For diagnosticArgument.cpp, I would prefer adding inline #pragma at only the sites affected (as suggested by David Holmes), with a comment about why this is necessary. But if others decide to go with other solutions, that's fine with me, too, but please remember to add a comment :-) Thanks

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread serguei.spit...@oracle.com
Hi Yasumasa, On 10/10/19 21:33, Yasumasa Suenaga wrote: Hi Serguei, On 2019/10/11 12:38, serguei.spit...@oracle.com wrote: Hi Yasumasa, If this problem is local then I'd prefer variant A as this solution is local too. If this problem is observed in other places then variant C would be

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
Hi Serguei, On 2019/10/11 12:38, serguei.spit...@oracle.com wrote: Hi Yasumasa, If this problem is local then I'd prefer variant A as this solution is local too. If this problem is observed in other places then variant C would be better. This problem might occur in other places in the

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread serguei.spit...@oracle.com
Hi Yasumasa, If this problem is local then I'd prefer variant A as this solution is local too. If this problem is observed in other places then variant C would be better. Thanks, Serguei On 10/10/19 18:34, Yasumasa Suenaga wrote: Hi, I want to get conclusion of this discussion. I

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Daniel D. Daugherty
I think Kim has already been clear that he is not a fan of option A: I'm not a fan of replacing correct and idiomatic uses of strncpy with strcpy or memcpy.  I've suggested in the past that we should turn off this warning while it is so buggy. Dan On 10/10/19 10:02 PM, Yasumasa Suenaga

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
Thanks Chris! If others agree with A, I will push webrev.02 . Yasumasa On 2019/10/11 10:50, Chris Plummer wrote: These solutions all have their merits and their warts, but we have to pick something. I'm ok with with A or C. For B I'd rather you instead used the #pragma at the warning

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
These solutions all have their merits and their warts, but we have to pick something. I'm ok with with A or C. For B I'd rather you instead used the #pragma at the warning site. If you go with (C), the review should go out to all of hotspot-dev and build-dev. Chris On 10/10/19 6:34 PM,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
Hi, I want to get conclusion of this discussion. I understand the fix of macroAssembler_x86.hpp is ok, but we have not yet had conclusion how we should fix diagnosticArgument.cpp . I think we can fix diagnosticArgument.cpp as following: A. Use memcpy()

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Kim Barrett
> On Oct 10, 2019, at 4:54 PM, Kim Barrett wrote: > This is a > relatively recent warning option (introduced in gcc8, and included in > -Wall) Maybe it was added to -Wall in gcc9, since we aren’t seeing these warnings with gcc8?

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Kim Barrett
> On Oct 10, 2019, at 3:03 AM, David Holmes wrote: > > On 10/10/2019 4:50 pm, Chris Plummer wrote: >> From JBS: >> >> /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/services/diagnosticArgument.cpp:154:14: >> warning: 'char* strncpy(char*, const char*, size_t)' output truncated >> before

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
I thought it was because gcc sees that "len" is always passed in as strlen(str). It therefore knows without any doubt that you are doing strncpy() on a nul terminated string, and are copying all but the nul. However, I missed one case where parse_value() is called and len not only is not

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Ioi Lam
We have strncpy all over the VM. Why is this the only one that's causing problems with gcc? We have one instance in the same file: void StringArrayArgument::add(const char* str, size_t len) {   if (str != NULL) {     char* ptr = NEW_C_HEAP_ARRAY(char, len+1, mtInternal);     strncpy(ptr, str,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
On 10/10/19 1:07 AM, Yasumasa Suenaga wrote: On 2019/10/10 16:42, David Holmes wrote: On 10/10/2019 5:25 pm, serguei.spit...@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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
On 10/10/19 12:42 AM, David Holmes wrote: On 10/10/2019 5:25 pm, serguei.spit...@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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
I saw the discussion in some OpenJDK mail list #pragma is uncomfortable because it disables to find implicit bug - but I could not find out them. It also includes -Wno-* option in GCC. Yasumasa On 2019/10/10 17:11, Yasumasa Suenaga wrote: On 2019/10/10 17:06, serguei.spit...@oracle.com

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
On 2019/10/10 17:06, serguei.spit...@oracle.com wrote: On 10/10/19 00:42, David Holmes wrote: On 10/10/2019 5:25 pm, serguei.spit...@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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
On 2019/10/10 16:42, David Holmes wrote: On 10/10/2019 5:25 pm, serguei.spit...@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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread serguei.spit...@oracle.com
On 10/10/19 00:42, David Holmes wrote: On 10/10/2019 5:25 pm, serguei.spit...@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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread David Holmes
On 10/10/2019 5:25 pm, serguei.spit...@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] =

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
On 2019/10/10 16:25, serguei.spit...@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] =

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread serguei.spit...@oracle.com
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'; Thanks, Serguei Chris On 10/9/19 11:31 PM,

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
On 10/10/19 12:03 AM, David Holmes wrote: On 10/10/2019 4:50 pm, Chris Plummer wrote: On 10/9/19 11:36 PM, David Holmes wrote: Hi Yasumasa, On 10/10/2019 3:55 pm, Yasumasa Suenaga wrote: Hi all, Please review this change:    JBS: https://bugs.openjdk.java.net/browse/JDK-8232084    webrev:

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread David Holmes
On 10/10/2019 4:50 pm, Chris Plummer wrote: On 10/9/19 11:36 PM, David Holmes wrote: Hi Yasumasa, On 10/10/2019 3:55 pm, Yasumasa Suenaga wrote: Hi all, Please review this change:    JBS: https://bugs.openjdk.java.net/browse/JDK-8232084    webrev:

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Yasumasa Suenaga
On 2019/10/10 15:50, Chris Plummer wrote: On 10/9/19 11:36 PM, David Holmes wrote: Hi Yasumasa, On 10/10/2019 3:55 pm, Yasumasa Suenaga wrote: Hi all, Please review this change:    JBS: https://bugs.openjdk.java.net/browse/JDK-8232084    webrev:

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
On 10/9/19 11:36 PM, David Holmes wrote: Hi Yasumasa, On 10/10/2019 3:55 pm, 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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread Chris Plummer
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]. Chris On 10/9/19 11:31 PM, serguei.spit...@oracle.com wrote: Hi Yasumasa, The fix in src/hotspot/cpu/x86/macroAssembler_x86.hpp looks Okay. But I don't understand why you

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread David Holmes
Hi Yasumasa, On 10/10/2019 3:55 pm, 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

Re: RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-10 Thread serguei.spit...@oracle.com
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); -

RFR: 8232084: HotSpot build failed with GCC 9.2.1

2019-10-09 Thread Yasumasa Suenaga
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 .