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, len);
+PRAGMA_DIAG_POP
I'd suggest to place the comment before the line with strncopy().
I'd suggest just dropping the comment as it adds nothing, further gcc 8 is not
flagging this use of strncpy.
The comment is suggested in [1].
Indeed stringop-truncation warning was not reported by GCC 8, but this option
introduced in it,
and I agree with Ioi to add the comment for other developers why this #pragma
is needed.
Yasumasa
[1]
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-October/029578.html
Otherwise okay.
Thanks,
David
Not subject for re-review.
Thanks,
Serguei
On 10/16/19 16:25, 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 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 tests on submit repo
(mach5-one-ysuenaga-JDK-8232084-1-20191016-1534-5969882).
Thanks,
Yasumasa
[1]
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-October/029547.html