Revert "x86_64: Suppress false positive valgrind error"

This reverts commit a1735e0aa8.

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: <https://bugs.kde.org/show_bug.cgi?id=485487>

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
Florian Weimer 2024-04-13 16:17:38 +02:00
parent cf11e74b0d
commit aea52e3d2b
4 changed files with 3 additions and 29 deletions

View File

@ -618,8 +618,7 @@ tests-special += $(objpfx)tst-valgrind-smoke.out
endif endif
$(objpfx)tst-valgrind-smoke.out: tst-valgrind-smoke.sh $(objpfx)ld.so $(objpfx)valgrind-test $(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)' \ $(SHELL) $< $(objpfx)ld.so $(rtlddir)/$(rtld-installed-name) '$(test-wrapper-env)' \
'$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test \ '$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test > $@; $(evaluate-test)
'$(valgrind-suppressions-tst-valgrind-smoke)' > $@; $(evaluate-test)
ifeq ($(run-built-tests),yes) ifeq ($(run-built-tests),yes)
tests-special += $(objpfx)tst-rtld-does-not-exist.out tests-special += $(objpfx)tst-rtld-does-not-exist.out

View File

@ -25,7 +25,6 @@ test_wrapper_env="$3"
run_program_env="$4" run_program_env="$4"
library_path="$5" library_path="$5"
test_prog="$6" test_prog="$6"
valgrind_suppressions="$7"
# Test whether valgrind is available in the test # Test whether valgrind is available in the test
# environment. If not, skip 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 # Test valgrind works with the system ld.so in the test environment
/bin/sh -c \ /bin/sh -c \
"${test_wrapper_env} ${run_program_env} \ "${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 ${system_rtld} /bin/echo ${system_rtld}" || exit 77
# Finally the actual test inside the test environment, # Finally the actual test inside the test environment,
@ -43,5 +42,5 @@ ${test_wrapper_env} ${run_program_env} \
# the smoke test under valgrind. # the smoke test under valgrind.
/bin/sh -c \ /bin/sh -c \
"${test_wrapper_env} ${run_program_env} \ "${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}" ${rtld} --library-path ${library_path} ${test_prog} ${rtld}"

View File

@ -211,14 +211,7 @@ tst-plt-rewrite2-ENV = GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2
$(objpfx)tst-plt-rewrite2: $(objpfx)tst-plt-rewritemod2.so $(objpfx)tst-plt-rewrite2: $(objpfx)tst-plt-rewritemod2.so
endif 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 test-internal-extras += tst-gnu2-tls2mod1
endif # $(subdir) == elf endif # $(subdir) == elf
ifeq ($(subdir),csu) ifeq ($(subdir),csu)

View File

@ -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
}