From: Ivo Raisr Date: Sat, 1 Aug 2015 12:11:09 +0000 (+0000) Subject: Fix hard-to-understand code in VG_(load_ELF)(). X-Git-Tag: svn/VALGRIND_3_11_0~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5633f3b114611d9e2f0bf65ed0fcca1168a9a70a;p=thirdparty%2Fvalgrind.git Fix hard-to-understand code in VG_(load_ELF)(). Although it is a valid C [1], the closing bracket for "case PT_INTERP" is misplaced. Fixes BZ #350854. [1] https://en.wikipedia.org/wiki/Duff%27s_device#Mechanism git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15467 --- diff --git a/NEWS b/NEWS index 85a5a384ca..71f120e1f6 100644 --- a/NEWS +++ b/NEWS @@ -272,6 +272,7 @@ where XXXXXX is the bug number as listed below. 350809 Fix none/tests/async-sigs for Solaris 350811 Remove reference to --db-attach which has been removed. 350813 Use handwritten memcheck assembly helpers on x86/Solaris in addition to {arm,x86}-linux +350854 hard-to-understand code in VG_(load_ELF)() n-i-bz Provide implementations of certain compiler builtins to support compilers who may not provide those n-i-bz Old STABS code is still being compiled, but never used. Remove it. diff --git a/coregrind/m_ume/elf.c b/coregrind/m_ume/elf.c index 051670199a..ee4b4e1817 100644 --- a/coregrind/m_ume/elf.c +++ b/coregrind/m_ume/elf.c @@ -443,6 +443,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) interp_size = end; } break; + } # if defined(PT_GNU_STACK) || defined(PT_SUNWSTACK) # if defined(PT_GNU_STACK) @@ -463,7 +464,6 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) // do nothing break; } - } } if (info->phdr == 0)