On Tue, 10 Mar 2026 04:55:20 GMT, Yasumasa Suenaga <[email protected]> wrote:
> On CentOS 7 (glibc-2.17-326.el7_9.3.x86_64), ld-2.17.so is mapped like > following: > > > 7f830b42c000-7f830b44e000 r-xp 00000000 08:04 202220966 /usr/lib64/ld-2.17.so > > > However SA maps it as following. Base address is correct, but end address is > different from "maps". > > > libsaproc DEBUG: /usr/lib64/ld-2.17.so [0] 0x7f830b42c000-0x7f830b62c000: > base = 0x7f830b42c000, vaddr = 0x0, memsz = 0x21960, filesz = 0x21960 > > > We fixed calculation logic in > [JDK-8377395](https://bugs.openjdk.org/browse/JDK-8377395) to align end > address to align `p_align` in ELF header, but the logic seems to be incorrect > (note that the calculation is working as expected). > > Linux Kernel > ([fs/binfmt_elf.c](https://github.com/torvalds/linux/blob/v6.19/fs/binfmt_elf.c#L414)) > aligns end address with page size, not `p_align`. So SA might need to follow > it. Otherwise address it might happen address confliction what we saw in > [JDK-8377395](https://bugs.openjdk.org/browse/JDK-8377395). Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/30154#pullrequestreview-4011105061
