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).

This pull request has now been integrated.

Changeset: 8ecb14ce
Author:    Yasumasa Suenaga <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/8ecb14cecf1f05ea7c65fcfb5bb05e1e3a895d72
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8379454: SA still calculates end address with incorrect alignment

Reviewed-by: kevinw, cjplummer

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

PR: https://git.openjdk.org/jdk/pull/30154

Reply via email to