Hi Chris,
Your change looks good.
BTW I saw JDK-8248876. I'm not sure, but I guess we can fix this issue if we
allow PT_INTERP in L118:
```
105 uintptr_t find_base_address(int fd, ELF_EHDR* ehdr) {
:
115 // the base address of a shared object is the lowest vaddr of
116 // its loadable segments (PT_LOAD)
117 for (phdr = phbuf, cnt = 0; cnt < ehdr->e_phnum; cnt++, phdr++) {
118 if (phdr->p_type == PT_LOAD && phdr->p_vaddr < baseaddr) {
119 baseaddr = phdr->p_vaddr;
120 }
121 }
```
/proc/<PID>/maps shows top of `java` is 0x56543b9df000:
56543b9df000-56543b9e0000 r--p 00000000 08:10 55770
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
`i target` on GDB shows 0x56543b9df000 is .interp section:
Local exec file:
`/usr/lib/jvm/java-11-openjdk-amd64/bin/java', file type elf64-x86-64.
Entry point: 0x56543b9e0330
0x000056543b9df318 - 0x000056543b9df334 is .interp
Thanks,
Yasumasa
On 2020/07/07 13:18, Chris Plummer wrote:
Hello,
Please help review the following:
http://cr.openjdk.java.net/~cjplummer/8248878/webrev.00/index.html
https://bugs.openjdk.java.net/browse/JDK-8248878
The explanation of the fix is in the CR. The parent CR, JDK-8248876 [1],
explains the issue being addressed.
There's no test for this fix yet. It requires the changes I'm making for JDK-8247514 [2],
which include changes to "findpc" support and the ClhsdbFindPC.java test that
trigger this issue.
[1] https://bugs.openjdk.java.net/browse/JDK-8248876
[2] https://bugs.openjdk.java.net/browse/JDK-8247514
thanks,
Chris