Date: Fri, 21 Aug 2009 22:45:45 GMT From: Stanislav Sedov <stas@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 167590 for review Message-ID: <200908212245.n7LMjjIk004054@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167590 Change 167590 by stas@stas_orion on 2009/08/21 22:45:26 - FreeBSD may copy the last file page to the following section, so the size of mapping will be smaller than filesiz. Affected files ... .. //depot/projects/valgrind/coregrind/m_debuginfo/readelf.c#8 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_debuginfo/readelf.c#8 (text+ko) ==== @@ -1262,7 +1262,8 @@ else if (rw_svma_limit == 0 && phdr->p_offset >= di->rw_map_foff && phdr->p_offset < di->rw_map_foff + di->rw_map_size - && phdr->p_offset + phdr->p_filesz <= di->rw_map_foff + di->rw_map_size) { + && phdr->p_offset + (phdr->p_filesz & ~(VKI_PAGE_SIZE - 1)) + <= di->rw_map_foff + di->rw_map_size) { rw_svma_base = phdr->p_vaddr; rw_svma_limit = phdr->p_vaddr + phdr->p_memsz; rw_bias = di->rw_map_avma - di->rw_map_foff + phdr->p_offset - phdr->p_vaddr;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908212245.n7LMjjIk004054>