RFR: 8328630: Add logging when needed symbols in dll are missing. [v3]
David Holmes
dholmes at openjdk.org
Wed Apr 3 07:31:09 UTC 2024
On Tue, 2 Apr 2024 12:19:52 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> It should be easy to test what happens when you ask for a symbol known to not exist.
>
> Yes, but unfortunately I have no win32 env. nor access to anything other than GA for windows.
> But I was thinking of the case where a Symbol have NULL as it's address.
>
> From some old MSDN article:
> "The only required array is the Export Address Table (EAT), which is an array of function pointers that contain the address of an exported function."
>
> AFAICT GetProcAddress just returns this "pointer" and you may have NULL pointers in this array.
>
> Hence I think the same issue with symbol exists with NULL address as on posix but not documented.
> Not all return values of NULL is actually an error.
>From an API perspective that seems completely broken to me as it is impossible to distinguish the two cases and a call to GetLastError may return an unrelated error. But I couldn't find anything that indicated NULL could be a valid returned address. I found this description of the EAT and IIUC it will only have entries for exported functions:
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#export-address-table
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18404#discussion_r1549080594
More information about the hotspot-runtime-dev
mailing list