]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Follow up to SVN commit r15936.
authorIvo Raisr <ivosh@ivosh.net>
Wed, 17 Aug 2016 18:05:13 +0000 (18:05 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Wed, 17 Aug 2016 18:05:13 +0000 (18:05 +0000)
Fix the sloppy check I introduced.
n-i-bz

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

coregrind/m_ume/elf.c

index 2cc1231e8c264376d50b1ea5298fea0e42a36175..8a998db71f0a85fd2f96a50fa531a1c89ae0ea84 100644 (file)
@@ -626,8 +626,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info)
             VG_(printf)("valgrind: m_ume.c: too small SUNWDTRACE size\n");
             return VKI_ENOEXEC;
          }
-         if ((ph->p_flags & PT_SUNWDTRACE_PROTECTION)
-                != PT_SUNWDTRACE_PROTECTION) {
+         if ((ph->p_flags & (PF_R | PF_W | PF_X)) != PT_SUNWDTRACE_PROTECTION) {
             VG_(printf)("valgrind: m_ume.c: SUNWDTRACE protection mismatch\n");
             return VKI_ENOEXEC;
          }
@@ -670,7 +669,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info)
                   VG_(printf)("valgrind: m_ume.c: too small SUNWDTRACE size\n");
                   return VKI_ENOEXEC;
                }
-               if ((iph->p_flags & PT_SUNWDTRACE_PROTECTION)
+               if ((iph->p_flags & (PF_R | PF_W | PF_X))
                       != PT_SUNWDTRACE_PROTECTION) {
                   VG_(printf)("valgrind: m_ume.c: SUNWDTRACE protection "
                               "mismatch\n");