RFR (S) 8237591: Mac: include OS X version in hs_err_pid crash log file
gerard ziemski
gerard.ziemski at oracle.com
Mon Jul 27 16:08:20 UTC 2020
hi Yasumasa,
On 7/17/20 7:19 PM, Yasumasa Suenaga wrote:
> Hi Gerard,
>
> I cannot review it because I do not have and am not familiar for Mac,
> but I have some comments.
>
>
> - You set OS name to `os` with strncpy(), but can you use #define
> for them? For example:
> #ifdef __APPLE__
> #define OSNAME "Darwin"
> #elif defined __OpenBSD__
> #define OSNAME "OpenBSD"
> #else
> #define OSNAME "BSD"
> #endif
>
> :
>
> snprintf(buf, buflen, OSNAME " %s, macOS %s", os, release,
> osproductversion);
>
>
> - You can replace strncpy() to write '\0'
> strncpy(release, "", sizeof(release)); -> release[0] = '\0';
Thank you for taking a look, but the code you are referencing is an
existing code and even though it could be improved, I'd rather not
mofify it in this fix.
cheers
More information about the hotspot-runtime-dev
mailing list