On Thu, 12 Dec 2024 19:53:12 GMT, Phil Race <p...@openjdk.org> wrote:

>> src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 141:
>> 
>>> 139:         dladdr((void *)AWT_OnLoad, &dlinfo);
>>> 140:         if (realpath((char *)dlinfo.dli_fname, buf) == NULL) {
>>> 141:             perror((char *)dlinfo.dli_fname);
>> 
>> Having error handling is better than no error handling, but is `perror` the 
>> best we can do?
>> 
>> OTOH, maybe it doesn't matter as much. Something would be very, very broken 
>> if this were to fail.
>
> I saw this in another bug report too from the same submitter.
> I don't know that I want to encourage this as a pattern, except in debug 
> builds. better might be to just copy dlinfo.dli_fname into buf ..

Hi @prrace,
> I saw this in another bug report too from the same submitter.

I did create 3 clang17 compile waring issues, the compile warings occur in 
different files, and maybe use should different solutions to solve the issue, 
so I create the separate issues.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22701#discussion_r1883209539

Reply via email to