From nobody Thu Dec 30 09:57:41 2021 X-Original-To: dev-commits-src-all@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 DA960192EC9C; Thu, 30 Dec 2021 09:57:41 +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 4JPkGY2crTz4lkn; Thu, 30 Dec 2021 09:57:41 +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 348F8168DD; Thu, 30 Dec 2021 09:57:41 +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 1BU9vfpB057207; Thu, 30 Dec 2021 09:57:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BU9vf6l057206; Thu, 30 Dec 2021 09:57:41 GMT (envelope-from git) Date: Thu, 30 Dec 2021 09:57:41 GMT Message-Id: <202112300957.1BU9vf6l057206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 133180557479 - main - Avoid emitting popcnt in libclang_rt.fuzzer*.a if unsupported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 133180557479cd9676758e6f3f93a9d3e1c6b532 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640858261; 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=WSC3GXIWmTEZiH2YQhrA6vOsEiAeoU8fdWlMK8I0ZpE=; b=r0wIbqxTQKg91VjqknbCnjsRmfX2RQ1gk7F86uY4KaxY47dJVzU9KkwpPRPzYEOE/dW0t0 3AaOtMXV4OXeihSxiJL7XuzgG4KzgykDtVaqZgBFR+WJ+DuZIu3gDT6zwnt+BnPY2Qy8rt sxadY9yI26xpwOOexICBa/ntmO0UAuylsJK/r8mTd6VCDVLKyNR+Sb82wox5X0OcVReBMb l3SbeHsD7MhF0i5bUvZTIcWLope9AttzmMJKo5TJ7A0L/cESyFqGTgY6FCdcqhosd4y9aC 3l2OKGqdieKGUkL2XVXJhxrYAxRrm9Rn/RmuMqlfTBSd4BhgPCggT/SQwfStnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640858261; a=rsa-sha256; cv=none; b=jBMBfbpTj1kNvvQPoJVnJkfxIrcQWTHZ+UgPlDs3bberWBu0z1xisBVTG/J+yjuYpBb72W 0gsV9KZwM18CfIENjkrbmoobUy16bP6VhQCtCSQW5sZ0lnBkncsMICQUBjGmfH0BsH41dw 2hWvoDLx0b8Lbp0p3nCog+J4UevhQ0Huv57jobafMZox++R+b6FRGoLn9spN7avDdTg3PC 55+wrc59a6RryVD+N93pus1d1VupiGxiqweSUlvNayxMJeJ/iWMUCYXO0TRi2CT3i2TrO8 PKmFgHmPCxrxvIutduLtXJKW+dteufzjwU3q4LOHdEpwiAKVzmUq0lhL/8xerA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=133180557479cd9676758e6f3f93a9d3e1c6b532 commit 133180557479cd9676758e6f3f93a9d3e1c6b532 Author: Dimitry Andric AuthorDate: 2021-12-30 09:53:25 +0000 Commit: Dimitry Andric CommitDate: 2021-12-30 09:55:49 +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 --- 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