From nobody Sun Jan 02 12:02:47 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B32C2193AC6A; Sun, 2 Jan 2022 12:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JRcvW3CMyz4dd1; Sun, 2 Jan 2022 12:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FA5911D94; Sun, 2 Jan 2022 12:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 202C2lnE098065; Sun, 2 Jan 2022 12:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 202C2la6098064; Sun, 2 Jan 2022 12:02:47 GMT (envelope-from git) Date: Sun, 2 Jan 2022 12:02:47 GMT Message-Id: <202201021202.202C2la6098064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 50b0f99010bc - stable/12 - Avoid emitting popcnt in libclang_rt.fuzzer*.a if unsupported List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 50b0f99010bc485e7f60e948ff3bc590fbbeea43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641124967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YK37ol74n0VWpaMJH5dlmAAK4if5Rpdlpa9IB97Mpfg=; b=l8asublhNhuPNlZiB0RGbBBQMD+80ubJisHWxHlF3Ho7EO8tpdH4q47GlvL4hmZxpjOWZX 8zfs1MEleWLWGfB3O/9DEjZFoKHB+uz2YA4ooxJXkyO/bdFR9nEK3IuwPxNnjj3ZpvlRlK 0Gsk7vODSsHWMwmH7AnSYa9F182sy+PuHqExOxrcBokRv1h3Eg1rPJsjOYBVvrTpEwiTxd XOBKNo39N829k/bpcBDfblyC2GrnstONl0OAgrXVXCCKe/SvLDCVSO+e09tdc+mzG66GDr l7F13dwwqkQ+h4zaVF4mmRNNVdfZfVNIKeTk9Z29FiiuNyRhZwNFLvuD397WMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641124967; a=rsa-sha256; cv=none; b=NqPapAXaBE1F46aMBl1ScWCljqWLhnC55OV9kUj+5v2dBI8zo4q4twrElrLJG/VP+i/XIU Z1UGBLUZG/F8qC3IPuXViLZQRO0+leztpmu8wltVtI0WAnuGWxfgRC6Bxr7OY22P7DLmkR BxEU22LoI6YWP+iTWjzninG6N5PHrnnV0tti7Iae3Hspd7xcNaKHPaIGKodlAZumqaumzw tHDyPGBhZVzQFMJr7Q7fmSflanTFm9wq1xJjKEhSfsXhMBnRWSDYB6/hS9iPNBaTMlhwK+ 48A8vEFA+7u1RI68glIhRJ7szLADRLM4pweGbbEHug+o/Jv35crJBkEmw1cJgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=50b0f99010bc485e7f60e948ff3bc590fbbeea43 commit 50b0f99010bc485e7f60e948ff3bc590fbbeea43 Author: Dimitry Andric AuthorDate: 2021-12-30 09:53:25 +0000 Commit: Dimitry Andric CommitDate: 2022-01-02 12:02:14 +0000 Avoid emitting popcnt in libclang_rt.fuzzer*.a if unsupported Since popcnt is only supported by CPUTYPE=nehalem and later, ensure that this instruction is only emitted when appropriate. Otherwise, programs using the library can abort with SIGILL. See also: https://github.com/llvm/llvm-project/issues/52893 PR: 258156 Reported by: Eric Rucker MFC after: 3 days (cherry picked from commit 133180557479cd9676758e6f3f93a9d3e1c6b532) --- contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerPlatform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerPlatform.h b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerPlatform.h index 1602e6789500..65e77ded8e82 100644 --- a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerPlatform.h +++ b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerPlatform.h @@ -87,7 +87,7 @@ (LIBFUZZER_APPLE || LIBFUZZER_LINUX || LIBFUZZER_NETBSD || \ LIBFUZZER_FREEBSD || LIBFUZZER_EMSCRIPTEN) -#ifdef __x86_64 +#if defined(__x86_64) && defined(__POPCNT__) #if __has_attribute(target) #define ATTRIBUTE_TARGET_POPCNT __attribute__((target("popcnt"))) #else