We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22831cb commit 8ecb14cCopy full SHA for 8ecb14c
1 file changed
src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
@@ -182,13 +182,14 @@ static bool fill_addr_info(lib_info* lib) {
182
return false;
183
}
184
185
+ long page_size = sysconf(_SC_PAGE_SIZE);
186
lib->end = (uintptr_t)-1L;
187
lib->exec_start = (uintptr_t)-1L;
188
lib->exec_end = (uintptr_t)-1L;
189
for (ph = phbuf, cnt = 0; cnt < ehdr.e_phnum; cnt++, ph++) {
190
if (ph->p_type == PT_LOAD) {
191
uintptr_t aligned_start = lib->base + align_down(ph->p_vaddr, ph->p_align);
- uintptr_t aligned_end = aligned_start + align_up(ph->p_memsz, ph->p_align);
192
+ uintptr_t aligned_end = aligned_start + align_up(ph->p_memsz, page_size);
193
if ((lib->end == (uintptr_t)-1L) || (lib->end < aligned_end)) {
194
lib->end = aligned_end;
195
0 commit comments