Integrated: 8254871: Remove unnecessary string copy in NetworkInterface.c

2020-10-27 Thread Eric Liu
On Fri, 23 Oct 2020 03:18:27 GMT, Eric Liu wrote: > A small improvement to avoid extra string copy. > > [Tests] > Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1. > No new failure found. This pull request has now been integrated. Changeset: a804c6a6 Auth

Re: RFR: 8254871: Remove unnecessary string copy in NetworkInterface.c

2020-10-26 Thread Eric Liu
On Fri, 23 Oct 2020 03:18:27 GMT, Eric Liu wrote: > A small improvement to avoid extra string copy. > > [Tests] > Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1. > No new failure found. @kimbarrett Could you help to take look at this trivial patch? --

RFR: 8254871: Remove unnecessary string copy in NetworkInterface.c

2020-10-22 Thread Eric Liu
A small improvement to avoid extra string copy. [Tests] Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1. No new failure found. - Commit messages: - 8254871: Remove unnecessary string copy in NetworkInterface.c Changes: https://git.openjdk.java.net/jdk/pull/82

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-30 Thread Eric Liu
Hi Kim, Thanks for your review. I tried to solve the problem with your suggestion, and have just one question. > On 29 September 2020 18:51 PM, Kim Barrett wrote: > I don't think using memory functions in place of string functions for string > manipulation is really an improvement. Yes, the ori

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-28 Thread Eric Liu
Hi, Thanks for looking at this. For gcc-10, it's hard to make 'strncpy' all right with asan enabled (approaches we talked previous don't work). I'm trying to find a better way to avoid using compile pragma. I suppose it would be better to use 'memcpy' to replace 'strncpy'. Thanks, Eric

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-22 Thread Eric Liu
Hi Kim,  Sorry for the delay. This patch removes a redundant string copy in NetworkInterface.c to avoid string-truncation warning. Other warnings we talked before, which are unable to completely fix in different version of gcc, I have to use pragma to suppress them as a workaround. This pat

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-08 Thread Eric Liu
Hi Kim, > Kim Barrett on Sent: 08 September 2020 20:28   >> On Sep 7, 2020, at 10:56 AM, Eric Liu wrote: >> I have tested 4 cases for those warnings: >> a) Without my patch, without asan, gcc-8 and gcc-10 are OK. >> b) Without my patch, with asan, gcc-8 has warned,

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-07 Thread Eric Liu
Hi Kim: Thanks for the discussion, this makes more sense to me now. > Kim Barrett on 06 September 2020 19:35 wrote: > > Can you be (very) specific about this.  Do all of these changes cause gcc10 > to warn?  Or > do only some of them.  If only some, specifically which ones? I have a > conjec

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-01 Thread Eric Liu
Hi Daniel, Kim, Thanks for your review. > Kim Barrett on Tue Sep 1 09:46:26 UTC 2020 > > Changes look good, subject to that caveat. I think these changes conform > better to the documented description of the warning than did the recent > NetworkInterface.c change mentioned above, so I’m hopeful

Re: RFR(S): 8252407: Build failure with gcc-8+ and asan

2020-09-01 Thread Eric Liu
Hi all, Please review this simple change to fix some compile warnings. The newer gcc (gcc-8 or higher) would warn for calls to bounded string manipulation functions such as 'strncpy' that may either truncate the copied string or leave the destination unchanged. This patch fixed stringop-truncati