RFR(S): 8214777: Avoid some GCC 8.X strncpy() errors in HotSpot

Kim Barrett kim.barrett at oracle.com
Thu Feb 21 00:34:22 UTC 2019


> On Feb 20, 2019, at 6:40 PM, Mikael Vidstedt <mikael.vidstedt at oracle.com> wrote:
> 
> 
> In the interest of making progress on the gcc 8.x support, and gcc 8.2 in particular, I’ve been addressing some of the build issues over the last couple of weeks. The remaining changes needed in hotspot are ones that overlap with the stuff covered by JDK-8214777 and the webrev[1] Simon prepared late last year which was discussed on hotspot-runtime-dev[2] at the time.
> 
> I’d like to suggest that instead of disabling the warnings we actually go ahead and make the relevant code changes. My version of the changes looks like this:
> 
> Issue: https://bugs.openjdk.java.net/browse/JDK-8214777
> webrev: http://cr.openjdk.java.net/~mikael/webrevs/8214777/webrev.00/open/webrev/
> 
> Please have a look and let me know what you think.
> 
> Passes tier1. Taking suggestions on other tests to run.
> 
> Cheers,
> Mikael
> 
> [1] http://cr.openjdk.java.net/~sgehwolf/webrevs/stooke/JDK-8214777/02/webrev/
> [2] http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-December/031743.html <http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-December/031743.html>

------------------------------------------------------------------------------

I think these should all be using os::strdup_check_oom:

src/hotspot/os/aix/os_perf_aix.cpp
src/hotspot/os/linux/os_perf_linux.cpp
src/hotspot/os/solaris/os_perf_solaris.cpp
src/hotspot/os/windows/os_perf_windows.cpp

------------------------------------------------------------------------------

Other than that, looks good.




More information about the hotspot-runtime-dev mailing list