From nobody Mon Jul 15 12:38:21 2024 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 4WN1vd6KL7z5Qrq5; Mon, 15 Jul 2024 12:38:21 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vd4Qgwz4Hcx; Mon, 15 Jul 2024 12:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047101; 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=1BtEsuq7zJ2g2u05lejAMZN4MCW3wCjMr6AArr2RhIg=; b=mwYpuafwKJWZJd1eO0sYURTytt3/zhbw+JDljq8jVY1rUlByNybHcPVKI9heMNHiDk9NxS Eo4Xrik7V0fN2phX8yMOmnHlOqowyylC8wqJSSFS+j+OekXn8/sM+XiqKYBz0YRQyrI6dC tarrXD9AlgJHfxiJbONfSjXTI0pGoBdzazYtnsG485hEFknPmPSLGNwSJ6mobXs3l9q8jN 09+Mj393RrG/R4aGx/XvN/oYxjRkbNUUB8YyE6CDhyMto1iEVt3onwJlrjMKHlZ3ReTJGN ehGykTZmWoiEl8YiKTyZSzqENaVM1vKQZjpYU+pzfJtPhIkTei2ptA5C67VyYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047101; a=rsa-sha256; cv=none; b=E/x2rlPg8ERo+drFpswwh7T8a1sYUCgi2XQMt1AGEnmalXmBiyNZtx0wqO2DMhMA05CipY hQoG7pMNOSqiXfUQouBoK1EI0aZOIvtYNEXDVWgsURJMdSAVnync6PC4Rfcetxp0Ph0MUq PZAumlbNVWgjS2fpOxPtbaP4FVg1T6iDaQYKcgD85oqfXJlGdJkcc4g3B/jfExyGBYqJUa gT4DFzErhEg2MtjERpSND1F7yCnE8ohYP05ZNxT9NVJPLYcbc7bdSJ3Sm4SLQtccGbZdYx iq923Do1wru8/VI48lX020KSmDb7fiwRYb8rY51tio88sJjwkBPM8sVM3BZabw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047101; 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=1BtEsuq7zJ2g2u05lejAMZN4MCW3wCjMr6AArr2RhIg=; b=gEYTxRPw+TnfkIPefPer66Jc/43x3EXfUv5VsnFeuCklHhHVCZTua68970XkGmVaBOgpEk 4vy09AtPN+hsr8gQ8yJIONbMeJ1jt9oOrVrzW0mZoLVHdWxYqQu0oA6U4h+zDxqplzh2l+ APTxyqFW13hZv54KoNP9NO1Va+5Ngv4X4eWt3yez6zb8RQdSRDu8NfWX8D97FfY1qFxrs/ H5iROkj1fca4hy1salwP3+hEo3ve5UcQJ83tpzHtM+vY3ftxea3e9UZ6AESBvogD8jK+pn ZvywCWnvUzqcrOR6zN3H4W+6TVfWOV9IuUuJ4neUPA23puGxsxo1aSEzmJAZgg== 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 4WN1vd41pJzt1Q; Mon, 15 Jul 2024 12:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCcLNQ060927; Mon, 15 Jul 2024 12:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcLog060924; Mon, 15 Jul 2024 12:38:21 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:21 GMT Message-Id: <202407151238.46FCcLog060924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: e63ac0eb580b - stable/14 - sys/sys: Fix __builtin_is_aligned fallback 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e63ac0eb580b287201eb7a8aa3644d6c249a9cce Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e63ac0eb580b287201eb7a8aa3644d6c249a9cce commit e63ac0eb580b287201eb7a8aa3644d6c249a9cce Author: Andrew Turner AuthorDate: 2024-05-22 08:18:26 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:26:34 +0000 sys/sys: Fix __builtin_is_aligned fallback When the compiler doesn't provide __builtin_is_aligned we use macro as a fallback. The macro was missing brackets around one argument. This could lead to incorrect results when the argument is more complex than a single stagement. Fix this by adding the needed brackets. Reviewed by: brooks, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45260 (cherry picked from commit 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1) --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 4893ae1662b8..84411e8e4b16 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -913,7 +913,7 @@ /* Provide fallback versions for other compilers (GCC/Clang < 10): */ #if !__has_builtin(__builtin_is_aligned) #define __builtin_is_aligned(x, align) \ - (((__uintptr_t)x & ((align) - 1)) == 0) + (((__uintptr_t)(x) & ((align) - 1)) == 0) #endif #if !__has_builtin(__builtin_align_up) #define __builtin_align_up(x, align) \