On Wed, 3 Nov 2021 19:08:38 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:

>> src/hotspot/os/bsd/os_bsd.cpp line 902:
>> 
>>> 900:       return false;
>>> 901:     }
>>> 902: #endif
>> 
>> We use dladdr() in several places in this code. I wonder whether it would 
>> make sense to fix all of those with a wrapper instead:
>> 
>>      static int my_dladdr(const void* addr, Dl_info* info) {
>>              if (addr != (void*)-1) {
>>                 return dladdr(addr, info);
>>              } else {
>>                 // add comment here
>>                 return 0;
>>              }
>>      }
>> #define dladdr my_dladdr
>
> I'll take a look at the other calls to dladdr(). I'm trying to limit what I 
> change
> here to things that actually failed in our test on macOS12 on X64 and aarch64.

I took a quick look at the other calls to `dladdr()` in 
src/hotspot/os/bsd/os_bsd.cpp
and I'm not comfortable with changing those uses without having a specific test
case that I can use to investigate those code paths.

We are fairly early in our testing on macOS12 so I may run into a reason to 
revisit
this choice down the road.

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

PR: https://git.openjdk.java.net/jdk/pull/6193

Reply via email to