From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 31D213849AEF for ; Sat, 13 Apr 2024 15:21:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 31D213849AEF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 31D213849AEF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713021707; cv=none; b=jDb06y0QmaRU0RL4ljlAuxkjlmbO4Y38I8nmLZiNuHl2pEfa914KDWZk9Vm/S+MPaWAJTmF97SoO6XAueEm5icqaHUpGQfPJ1RWkaQXEkuimNG71gBqyX/voD3c4Kcoo7v7lCP7a9BgDf6FYZO//0BswVqVsMQ27Ql+4Fcto7pk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713021707; c=relaxed/simple; bh=XkzCsyNjVt/QFpbvDfvuRggfjUxAVae9+KdvI+aXiq0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SbVK+rRmwPBzGxmITf9H9E1Omxbzp0moXWcf6WXEVJ3LOwdUUUAj5lDMmWb87hqZCErRFGslVWcNzThIbK+Nj18GMr4XOHktZ3irOPgVaNmjipFYX1hQlrhPiL+tg0dV0WKAQdwyQqHzLtkVIhn84mXtkI4IZal3UtOiGgcJock= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713021704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=Ket84IeSBtDLiXTTORutDRev4y43cpBDNsI0YEjsz4k=; b=YUzIYt03gyHEDSQko93gdrELGocLb+ODaRb2LELU3IwvozQB0GrLjkBhhFeM1u3t2P0/hq fBL1ua0Kflr1Jv4pIjJfcdi208lAuV31tmPINpoiZbMy42UOtWvOb4KYwfV1cmbi8eKF31 f2pGm571s7prWVfIUR54+tfRJSPAUIY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-I8HIYA8FOZa9weAFbW-OYg-1; Sat, 13 Apr 2024 11:21:41 -0400 X-MC-Unique: I8HIYA8FOZa9weAFbW-OYg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C94F529AB3F8; Sat, 13 Apr 2024 15:21:40 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D0F01C06889; Sat, 13 Apr 2024 15:21:39 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: H.J. Lu , Sunil K Pandey Subject: [PATCH] Revert "x86_64: Suppress false positive valgrind error" Date: Sat, 13 Apr 2024 17:21:34 +0200 Message-ID: <87ttk51e69.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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: --- 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 -} base-commit: ae7468a7b0bcf22e9cd5fcae42bb9e4f65de83ee