]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Ignore ELF phdrs that have a p_memsz of zero, as appears to happen
authorJulian Seward <jseward@acm.org>
Tue, 12 Jul 2011 06:24:23 +0000 (06:24 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 12 Jul 2011 06:24:23 +0000 (06:24 +0000)
on Android.  Bug 266035 comment 30.  (John Reiser, jreiser@bitwagon.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11878

coregrind/m_ume/elf.c

index 678d16fee20f1cc226d6882d736cbdc197725916..4ab8712f3eeec2a0050177523cdaf0f1870dbfad 100644 (file)
@@ -390,7 +390,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info)
             ESZ(Phdr) *iph = &interp->p[j];
             ESZ(Addr) end;
 
-            if (iph->p_type != PT_LOAD)
+            if (iph->p_type != PT_LOAD || iph->p_memsz == 0)
                continue;
             
             if (!baseaddr_set) {