RFR: 8339331: GCC fortify error in vm_version_linux_aarch64.cpp [v2]
SendaoYan
syan at openjdk.org
Tue Dec 10 10:18:13 UTC 2024
On Tue, 10 Dec 2024 09:47:25 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use guarantee instead of assert to suppress gcc warnings
>
> src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp line 191:
>
>> 189: PRAGMA_NONNULL_IGNORED
>> 190: ssize_t read_sz = ::read(fd, buf, buflen);
>> 191: PRAGMA_DIAG_POP
>
> Does hardening `buf != nullptr` to a `guarantee()` fix it?
Thanks, use guarantee instead of assert can suppress the gcc warnings. I think it's better than use suppression pragma macro.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22655#discussion_r1877789963
More information about the hotspot-runtime-dev
mailing list