< prev index next >

src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c

Print this page

        

*** 693,702 **** --- 693,706 ---- static bool read_lib_segments(struct ps_prochandle* ph, int lib_fd, ELF_EHDR* lib_ehdr, uintptr_t lib_base) { int i = 0; ELF_PHDR* phbuf; ELF_PHDR* lib_php = NULL; + #ifndef LIBC + #error "LIBC not set" + #endif + int page_size = sysconf(_SC_PAGE_SIZE); if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL) { return false; }
*** 716,727 **** goto err; } } else { // Coredump stores value of p_memsz elf field // rounded up to page boundary. ! ! if ((existing_map->memsz != page_size) && (existing_map->fd != lib_fd) && (ROUNDUP(existing_map->memsz, page_size) != ROUNDUP(lib_php->p_memsz, page_size))) { print_debug("address conflict @ 0x%lx (existing map size = %ld, size = %ld, flags = %d)\n", target_vaddr, existing_map->memsz, lib_php->p_memsz, lib_php->p_flags); --- 720,731 ---- goto err; } } else { // Coredump stores value of p_memsz elf field // rounded up to page boundary. ! if ((strcmp(LIBC, "musl")) && ! (existing_map->memsz != page_size) && (existing_map->fd != lib_fd) && (ROUNDUP(existing_map->memsz, page_size) != ROUNDUP(lib_php->p_memsz, page_size))) { print_debug("address conflict @ 0x%lx (existing map size = %ld, size = %ld, flags = %d)\n", target_vaddr, existing_map->memsz, lib_php->p_memsz, lib_php->p_flags);
< prev index next >