On 2020-09-02 09:50, Kim Barrett wrote:
On Sep 2, 2020, at 2:39 AM, Magnus Ihse Bursie <magnus.ihse.bur...@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.
Yes, but that's hotspot only. The other JDK libraries would not be able
to use it. (And as I said, there are other, already existing functions,
that ideally should be shared between hotspot and the rest of the
libraries).
/Magnus