|
From: Julian S. <se...@so...> - 2021-03-12 16:59:50
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=21571252964c4d7860210cbe9f60a49eb6881824 commit 21571252964c4d7860210cbe9f60a49eb6881824 Author: Julian Seward <js...@ac...> Date: Fri Mar 12 17:55:46 2021 +0100 mc_translate.c: enable further uses of DLexpensive for scalar EQ/NE comparisons mc_translate.c: enable further cases where scalar integer EQ/NE comparisons use expensive instrumentation by default: x86, amd64 for 16-bit comparisons arm, arm64 for 32-bit comparisons This fixes 'Bug 434193 - GCC 9+ inlined strcmp causes "Conditional jump or move depends on uninitialised value" report'. Patch from Mike Crowe <ma...@mc...>. Diff: --- NEWS | 1 + memcheck/mc_translate.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index cd8a509faa..028725c038 100644 --- a/NEWS +++ b/NEWS @@ -170,6 +170,7 @@ where XXXXXX is the bug number as listed below. 433629 valgrind/README has type "abd" instead of "and" 433641 Rust std::sys::unix::fs::try_statx Syscall param fstatat(file_name) 433898 arm64: Handle sp, lr, fp as DwReg in CfiExpr +434193 GCC 9+ inlined strcmp causes "Conditional jump or move [..] value" report n-i-bz helgrind: If hg_cli__realloc fails, return NULL. diff --git a/memcheck/mc_translate.c b/memcheck/mc_translate.c index 516988bdd4..739f67cbf9 100644 --- a/memcheck/mc_translate.c +++ b/memcheck/mc_translate.c @@ -8586,17 +8586,22 @@ IRSB* MC_(instrument) ( VgCallbackClosure* closure, approximation to the above, and is self-contained.*/ # if defined(VGA_x86) mce.dlbo.dl_Add32 = DLauto; + mce.dlbo.dl_CmpEQ16_CmpNE16 = DLexpensive; mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive; # elif defined(VGA_amd64) mce.dlbo.dl_Add32 = DLexpensive; mce.dlbo.dl_Add64 = DLauto; + mce.dlbo.dl_CmpEQ16_CmpNE16 = DLexpensive; mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive; mce.dlbo.dl_CmpEQ64_CmpNE64 = DLexpensive; # elif defined(VGA_ppc64le) // Needed by (at least) set_AV_CR6() in the front end. mce.dlbo.dl_CmpEQ64_CmpNE64 = DLexpensive; # elif defined(VGA_arm64) + mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive; mce.dlbo.dl_CmpEQ64_CmpNE64 = DLexpensive; +# elif defined(VGA_arm) + mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive; # endif /* preInstrumentationAnalysis() will allocate &mce.tmpHowUsed and then |