From nobody Sun Jan 02 12:02:32 2022 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 C6E5E193AAD7; Sun, 2 Jan 2022 12:02:32 +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 4JRcvD3lZdz4dHy; Sun, 2 Jan 2022 12:02:32 +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 616D811D92; Sun, 2 Jan 2022 12:02:32 +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 202C2Wlk097927; Sun, 2 Jan 2022 12:02:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 202C2Woe097926; Sun, 2 Jan 2022 12:02:32 GMT (envelope-from git) Date: Sun, 2 Jan 2022 12:02:32 GMT Message-Id: <202201021202.202C2Woe097926@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: 802ff7fcee24 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 802ff7fcee24cb224ea430ac45bece8f8743791f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641124952; 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=hwhWOtWvm0si3OQBgiG47FO70zd/XrJYrdzNXBZ+l48=; b=RD3dHqYjur3F1QERd5ZLLbUeN5usURwSZR+powOZJRBKXkoZXX+IKaz2E3BunKb/0R3gOD j1cNBUvjpD80Bmqw/YHl/uE4KXuAMsso5sXbxgY+3r9skThoO0EUCI68w+HhlI4azbfOXw mNQjUiwqW9lYNQBhRj4/AfrIu0PownR8k+PN/Z9JsFlx/DvGZTzElIaNUzBKzGZSbPEWTL WaMZV8S8myY4o1IorcpqlPeIVMeQKGIiBGvDiy1XZnW1qSxueX8H4m/jKQle/8ENRR51WX MHBqyDd37ASTeNv7tjjt0iOxA8o0FtR7slXhjsdFBlGQaQ6DDwGXvpc0TQ/rrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641124952; a=rsa-sha256; cv=none; b=WnuKCSWxb/CyCl1VCB2hg11/GtuKvWdnHQCQbhJU7uFYYQsxohqbKy8k9zXR0PJ20dbduV ine2IXpon6KLQXJS0OZNbsy0Mec4w7rFM0piwpOI8cIYbzntwr4kP/ReEU9hqgWQL+ddBP Drd4sfJiFtwmcLaBYWuZAILhjjicpFkrFkVp3c4oUiJDPqXMmnbXqfGWN7WeYHOTfYjvF6 Vypngnd+Z+JjLhQ46yjcZspHm+y2qojTd23UVdFJCoAWBOufaJfujS5620ZTAXqS6UewmY vS4ryR71rG/lcU9dRkbzKsPmNU/1nBbwgx3fMHdzzmy/Foj2YYxZ2Q28pw9uLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=802ff7fcee24cb224ea430ac45bece8f8743791f commit 802ff7fcee24cb224ea430ac45bece8f8743791f Author: Dimitry Andric AuthorDate: 2021-12-30 09:53:25 +0000 Commit: Dimitry Andric CommitDate: 2022-01-02 12:02:19 +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