RFR: 8261966: macOS M1: report in hs_err log if we are running x86 code in emulation mode (Rosetta) [v4]
Mikael Vidstedt
mikael at openjdk.java.net
Mon Mar 22 21:40:43 UTC 2021
On Mon, 22 Mar 2021 19:48:47 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove white space
>
> src/hotspot/os/bsd/os_bsd.cpp line 1407:
>
>> 1405: #ifdef __APPLE__
>> 1406: if (VM_Version::is_cpu_emulated()) {
>> 1407: strcpy(emulated, " (EMULATED)");
>
> I think code checkers will complain about using `strcpy()` here.
> I believe that `strncpy()` is preferred.
Or perhaps:
const char* emulated = "";
#ifdef __APPLE__
if (VM_Version::is_cpu_emulated()) {
emulated = " (EMULATED)";
}
#endif
...
?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3077
More information about the hotspot-runtime-dev
mailing list