From b0b7bbf30b839b016fa3982f53a7c14f9026595f Mon Sep 17 00:00:00 2001 From: Ivo Raisr Date: Wed, 17 Aug 2016 18:05:13 +0000 Subject: [PATCH] Follow up to SVN commit r15936. Fix the sloppy check I introduced. n-i-bz git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15939 --- coregrind/m_ume/elf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/coregrind/m_ume/elf.c b/coregrind/m_ume/elf.c index 2cc1231e8c..8a998db71f 100644 --- a/coregrind/m_ume/elf.c +++ b/coregrind/m_ume/elf.c @@ -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"); -- 2.47.2