From nobody Mon Jul 15 12:38:25 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 4WN1vj5yT7z5Qrqv; Mon, 15 Jul 2024 12:38:25 +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 4WN1vj2nCdz4Hk8; Mon, 15 Jul 2024 12:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047105; 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=kh7KDABb6x/N90A5iEmFzErgvfvxrwfSGPicZ27dYDE=; b=rXLiciCbGeZr71Y6SAFpKXGyT+F4geecsR0y7QumaVrQiASBRiWZsvbWl6uazFZrTPFBsf nE0z0xCCRERaBu7cmlQvlDBcTUyF+PkjjDj4ugvTw5nFRuZ2ekuAiyQ6PXTqfl+se3ePm7 oNUhPwlLHIDW3o/IY0G1oxmJ5h876U6Uxi9/OYmYerK1A6On0mINK63KNxc5yUVU7KQHEE r/p3TmXH2vt++D2a/tMKF8h5jndfNrQPYS7ruHzS1aRZVNVp5yCUBdJweMgs79WWrLED0V Owmu0ztf+QNZoYhBLxG6ablTnI8yOaXGLND6DAp69g9TMhHZdVhm0WbJfO8YJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047105; a=rsa-sha256; cv=none; b=Jn4XFp1JrqVkQFHVi5NFjXvgZudBND5nWh2cqjVzitq3NRGetG5edb6w0DCvZzMN59haJ5 LbHxQINjM8J/5fbTJM1yZspSfklEmEHET5z8aet/VuS8fenQg8/r6QOvVNB/6rUhWUoVIT +EJXEUtwgyrFv7qbmzyVXQAczgmOFdCeRyQjmj/o4c+ysgIz2H1zf0UNE0PrPiFU4SZgJ3 MNVRI9g5StB2ym/aARk97s7Wsn0sCQjdRXWxlUSfPkjg6cobXO9o/EQr2TYND7b94UCMB3 6PgvL703vdTJkzCwkIUHowuKdgsYyfWum22Z9Os9kyVig6gMdPfawZXgLnWVuA== 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=1721047105; 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=kh7KDABb6x/N90A5iEmFzErgvfvxrwfSGPicZ27dYDE=; b=W+RqtCwV+plVV9z5J8Po5Ipzp4uN9r6pqGz0CafNWWGXZYDMTkx0+Y3zrEcurX8RnlpL/Z ELIuC6P5uktYny70E2qOKx7OWtd897vfSetpApTZw7Yku9tLNDrlpe4CYXpuZYx1D0Tp4s xlwaBrD7kh1GCxwEvu0niSIZBDZdp6gsHkUwvMlTzuctqLMQ44sMoEF7x+QUngcEJppyvX AeDX0IdL/gxlkoCyj4lWcuEyB76NsRb6Vel77SSXvuExkwYfPk0GDr8jI+nO8+NHx13g5Y NYG5r3ROcfAEDzVq39dYK3vbXLl74M3niiGttiP4Z8O11OnId7y7fwIggVZcQA== 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 4WN1vj2KsTzt5k; Mon, 15 Jul 2024 12:38:25 +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 46FCcPxK061269; Mon, 15 Jul 2024 12:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcPo4061266; Mon, 15 Jul 2024 12:38:25 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:25 GMT Message-Id: <202407151238.46FCcPo4061266@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: f028010f4eac - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: f028010f4eac429f94ba15a7490ce28d5e8c80ff Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f028010f4eac429f94ba15a7490ce28d5e8c80ff commit f028010f4eac429f94ba15a7490ce28d5e8c80ff Author: Andrew Turner AuthorDate: 2024-05-22 08:18:26 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:34:29 +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 080fcf27dba4..df15a3c04193 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -896,7 +896,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) \