On Fri, 23 Jan 2026 17:47:38 GMT, Chris Plummer <[email protected]> wrote:

>> src/jdk.hotspot.agent/linux/native/libsaproc/symtab.c line 555:
>> 
>>> 553: static bool is_in(uintptr_t offset, struct elf_symbol* sym) {
>>> 554:   if (offset == sym->offset) {
>>> 555:     // offset points the top of the symbol
>> 
>> Suggestion:
>> 
>>     // offset points to the top of the symbol
>
> This code is now confusing to read without knowledge that it is trying to 
> solve the issue of a 0 sized symbol. I would suggest having it check 
> `(sym->size == 0 && offset == sym->offset)`, and add a comment explaining 
> why, and then the check below should be reverted back to `offset >= 0` 
> instead of `offset > 0`. It is confusing to not have it check the full 
> address range, especially since the comment indicates that it does.

I fixed the conditions, and updated comments. Could you review again?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29023#discussion_r2723428565

Reply via email to