Integrated: 8248876: LoadObject with bad base address created for exec file on linux

Yasumasa Suenaga ysuenaga at openjdk.java.net
Mon Feb 8 02:37:42 UTC 2021


On Tue, 2 Feb 2021 23:37:21 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> We could see NPE on `LinuxCDebugger::loadObjectContainingPC` which is used mainly by the clhsdb `findpc` command. (See [JDK-8248876](https://bugs.openjdk.java.net/browse/JDK-8248876) for more details)
> 
> It is caused by PIE executable handling.
> 
> Currently we use virtual address of top of PT_LOAD in executable as base address - it is valid for ET_EXEC binary.
> However, in case of ET_DYN binary (PIE binary), we should handle it like a shared library.
> In GDB, base address of executable would be calculated by dynamic section. SA should also do so.

This pull request has now been integrated.

Changeset: 9d59dec2
Author:    Yasumasa Suenaga <ysuenaga at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/9d59dec2
Stats:     19 lines in 2 files changed: 4 ins; 5 del; 10 mod

8248876: LoadObject with bad base address created for exec file on linux

Reviewed-by: cjplummer, kevinw

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

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


More information about the serviceability-dev mailing list