From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id D5E733849AEF; Sat, 13 Apr 2024 15:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5E733849AEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713022953; bh=iBJUv86FAuoCK53XtJHYSniXkLqed1P6zMbE/12Mj6M=; h=From:To:Subject:Date:From; b=YrjSradjBtldEDKPAdW9XYKZXdo74yrUgFOnYFLrFDe4S2qGbwp3XB/GpwEFTbzae FTgeeE3t47s/dNLOoN0mqzegRZw6er73hhL/HBEJti9GnTSQFBdGQgiFitMkGpMOfF apwXh+bYnY0T5rssZQwtDSUhUdCfDlA/csUdnUFA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] Revert "x86_64: Suppress false positive valgrind error" X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: cf11e74b0d81d389bcad5cdbba020ba475f0ac4b X-Git-Newrev: aea52e3d2b71e89f2ba4fd4d8f1f8d3036d83c1d Message-Id: <20240413154233.D5E733849AEF@sourceware.org> Date: Sat, 13 Apr 2024 15:42:33 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aea52e3d2b71e89f2ba4fd4d8f1f8d3036d83c1d commit aea52e3d2b71e89f2ba4fd4d8f1f8d3036d83c1d Author: Florian Weimer Date: Sat Apr 13 16:17:38 2024 +0200 Revert "x86_64: Suppress false positive valgrind error" This reverts commit a1735e0aa858f0c8b15e5ee9975bff4279423680. The test failure is a real valgrind bug that needs to be fixed before valgrind is usable with a glibc that has been built with CC="gcc -march=x86-64-v3". The proposed valgrind patch teaches valgrind to replace ld.so strcmp with an unoptimized scalar implementation, thus avoiding any AVX2-related problems. Valgrind bug: Reviewed-by: H.J. Lu Diff: --- elf/Makefile | 3 +-- elf/tst-valgrind-smoke.sh | 5 ++--- sysdeps/x86_64/Makefile | 7 ------- sysdeps/x86_64/tst-valgrind-smoke.supp | 17 ----------------- 4 files changed, 3 insertions(+), 29 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index 6dad11bcfb..fb3c3c4dff 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -618,8 +618,7 @@ tests-special += $(objpfx)tst-valgrind-smoke.out endif $(objpfx)tst-valgrind-smoke.out: tst-valgrind-smoke.sh $(objpfx)ld.so $(objpfx)valgrind-test $(SHELL) $< $(objpfx)ld.so $(rtlddir)/$(rtld-installed-name) '$(test-wrapper-env)' \ - '$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test \ - '$(valgrind-suppressions-tst-valgrind-smoke)' > $@; $(evaluate-test) + '$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test > $@; $(evaluate-test) ifeq ($(run-built-tests),yes) tests-special += $(objpfx)tst-rtld-does-not-exist.out diff --git a/elf/tst-valgrind-smoke.sh b/elf/tst-valgrind-smoke.sh index 7d0ceac6b1..e33b2fa1d7 100644 --- a/elf/tst-valgrind-smoke.sh +++ b/elf/tst-valgrind-smoke.sh @@ -25,7 +25,6 @@ test_wrapper_env="$3" run_program_env="$4" library_path="$5" test_prog="$6" -valgrind_suppressions="$7" # Test whether valgrind is available in the test # environment. If not, skip the test. @@ -35,7 +34,7 @@ ${test_wrapper_env} ${run_program_env} \ # Test valgrind works with the system ld.so in the test environment /bin/sh -c \ "${test_wrapper_env} ${run_program_env} \ - valgrind -q --error-exitcode=1 ${valgrind_suppressions} \ + valgrind -q --error-exitcode=1 \ ${system_rtld} /bin/echo ${system_rtld}" || exit 77 # Finally the actual test inside the test environment, @@ -43,5 +42,5 @@ ${test_wrapper_env} ${run_program_env} \ # the smoke test under valgrind. /bin/sh -c \ "${test_wrapper_env} ${run_program_env} \ - valgrind -q --error-exitcode=1 ${valgrind_suppressions} \ + valgrind -q --error-exitcode=1 \ ${rtld} --library-path ${library_path} ${test_prog} ${rtld}" diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 39048b12e0..ce949dba27 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -211,14 +211,7 @@ tst-plt-rewrite2-ENV = GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2 $(objpfx)tst-plt-rewrite2: $(objpfx)tst-plt-rewritemod2.so endif -# Check if ISA level is 3 or above. -ifneq (,$(filter $(have-x86-isa-level),$(x86-isa-level-3-or-above))) -valgrind-suppressions-tst-valgrind-smoke = \ - --suppressions=$(..)sysdeps/x86_64/tst-valgrind-smoke.supp -endif - test-internal-extras += tst-gnu2-tls2mod1 - endif # $(subdir) == elf ifeq ($(subdir),csu) diff --git a/sysdeps/x86_64/tst-valgrind-smoke.supp b/sysdeps/x86_64/tst-valgrind-smoke.supp deleted file mode 100644 index 533c2deaff..0000000000 --- a/sysdeps/x86_64/tst-valgrind-smoke.supp +++ /dev/null @@ -1,17 +0,0 @@ -{ - False positive at strcmp-avx2.S:462 - Memcheck:Cond - fun:strcmp - fun:_dl_name_match_p - fun:_dl_map_object - fun:map_doit - fun:_dl_catch_exception - fun:_dl_catch_error - fun:do_preload - fun:handle_preload_list - fun:dl_main - fun:_dl_sysdep_start - fun:_dl_start_final - fun:_dl_start - obj:*/elf/ld.so -}