From patchwork Sat Apr 13 14:48:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 88455 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45E8A3846400 for ; Sat, 13 Apr 2024 14:49:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 09C9A3849AEF for ; Sat, 13 Apr 2024 14:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09C9A3849AEF 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 09C9A3849AEF 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=1713019758; cv=none; b=pmqRG336LD3maO0W6KSfMoNPsxCDpwsBznglUALq0BfpLYQY5pV5mN+bElhSJXhsJJc+EqSwtdjtXEQpV3jlSDueFLxgSbTpfwnAUGQP1jB/NOxEDyFpcuqRJy0b/4D4bhH9mhPbaRi5XLkKHNtSGKopZHQe0Q936ZlMBQsiIFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713019758; c=relaxed/simple; bh=3oSgQjlp/5FpssyHH0mJB92AKV12Mt9n7CVGcdRS3Nk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L3t0Q5/o5MhA/2gSDdaXYgteDzwpBbvq4IjaLXKIzAf6GeLET9vHcsAh3KjDag8zndjiZPNVB9O44fLIrZkSFpjbHpRZ3WI8vrj0vNXLJnQyO8Tp9Ik7QyDTglrNygtSV5lnQGaW7hZLtiIGNpZGDJjk5XtShckmZgXVV6bt8Q4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713019754; 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=D6a5vY6hH4qj07JZP81FWoSUFzwE+EcrwmtqcmutqWI=; b=FFZDFKOH1XZ8AkMVURxEofxJRtGhWiMTgeVqYJN5bz40tW0p96909oTwz4Ux9yfLUqHaoz C7zvn6sAT3jtyzJvhxG7PYFsPjP9v94mewMuPF06mPdFxmkQKLcuPqUxIZckteTD4KgOBG y0lnYNXMgN1Hb5p4uxL9O6kko/2VjGA= 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-312-R-0UR3UdNsa4lrtjeCjcNg-1; Sat, 13 Apr 2024 10:49:12 -0400 X-MC-Unique: R-0UR3UdNsa4lrtjeCjcNg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 DDF3729ABA18; Sat, 13 Apr 2024 14:49:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3773D40C6DAE; Sat, 13 Apr 2024 14:49:11 +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 16:48:49 +0200 Message-ID: <87a5lx2u9a.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.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org 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 valgrind fix addresses the observed test failure as well. Upstream bug: Tested on x86_64-linux-gnu with and without CC="gcc -march=x86-64-v3". The elf/tst-valgrind-smoke tests again fails with an unpatched valgrind, and the proposed upstream patch fixes it. (Apparently, valgrind matches on soname, and not the file name, which is ld.so in the test.) --- 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(-) base-commit: ae7468a7b0bcf22e9cd5fcae42bb9e4f65de83ee 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 -}