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

Kim Barrett kim.barrett at oracle.com
Wed Sep 2 07:50:38 UTC 2020


> On Sep 2, 2020, at 2:39 AM, Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> wrote:
> 
> On 2020-09-01 11:46, Kim Barrett wrote:
>> I really hate -Wstringop-truncation.  It's been a constant source of churn
>> for us ever since it appeared.  The changes being made to getIndex and
>> getFlags (NetworkInterface.c) are modifying lines that were changed very
>> recently to deal with such warnings from gcc10.  I'm worried that these new
>> changes will re-trigger warnings from gcc10 (though this change isn't a
>> revert; the gcc10 warning was justifiable).  I think it should be okay, but
>> there’s some risk here.
> Maybe we should have a common library for all native code where we supply our own string operation functions? It will then be much easier to make sure the implementation passes different compiler versions, and that we provide sane semantics (which isn't really the  case with the original C library functions; hence all this warning churning).

For the recurring problems with strncpy, there’s already this:
https://bugs.openjdk.java.net/browse/JDK-8232187
Nobody’s picked it up yet.



More information about the core-libs-dev mailing list