From nobody Mon Nov 07 09:56:04 2022 X-Original-To: dev-commits-ports-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 4N5RSh6jktz4hWt2; Mon, 7 Nov 2022 09:56:04 +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 4N5RSh5nGHz4PJt; Mon, 7 Nov 2022 09:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667814964; 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=TTbiJD5jsrrlUD5LcANg4UiHEEH6WgVWsNYuUQvuwp8=; b=Ag/iG7PDrkbJv0GuQd506ZcH5rJS9QWgl3LnuFPSybXoyutdQo/1UBQ0SjFibJo5S5eUve 8krP6a13f9+VNERHQ31CVm7BFGXKe7cGRhxSZi4J2qxZscqK0ENLHX/+xD7EShz4tX4+yC UY1Qu3iP2CXn6PR0Fhg7Gt95H50kgr4qXzzg5L4XQSS+FWkByU2SBJ/cKmE9vxD4uKJmhM JJihP352hjDdo/kZ9xE0/TqNzM2ZL+KYhPj/qZUR0+/K1MIJJXUINwiTDSDPTFMXH8DmJy bpzVUx+YcVH+0M2iJ8crkDnZIYB0u67KGUsyTy/cuXuIiQJ7s5yKVFvSR3PXeQ== 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 4N5RSh4Y1hzxCP; Mon, 7 Nov 2022 09:56:04 +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 2A79u4ll065992; Mon, 7 Nov 2022 09:56:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A79u4vh065991; Mon, 7 Nov 2022 09:56:04 GMT (envelope-from git) Date: Mon, 7 Nov 2022 09:56:04 GMT Message-Id: <202211070956.2A79u4vh065991@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rene Ladan Subject: git: ab3d24830347 - main - www/ungoogled-chromium: unbreak on i386 by enforcing 8 byte alignment on i386 in partition alloc List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rene X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab3d248303471f1486cb847e1bf6d178663d0d8e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667814964; 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=TTbiJD5jsrrlUD5LcANg4UiHEEH6WgVWsNYuUQvuwp8=; b=anKlem4AEuyYt0vWIQD0WPslGAECSXTayHh8mPjRAlqOPgt5B5oSKz0c3YW0md5OJGLqYI s3CcHUGzYHlJEVX1UmZVHdjeKdeS9v3mwIevTOn+reO4z7nat6cMato3CdtFOT9MDcE7L7 wYva8m6InjB3ZZyK+wdngyqoAyAlf1LircBylE/oA+Lr5aBDaCvn9PrH8ai/AWQWUnwW8Y /OSd4+JyDFUxAyghk2YPkAqjUJJla5eqFdYbJHHG+OunxI/USLwRi9zZRmSN9X7VbNaIsH fBEqdKIauCOKgh0M/jGXeYcsSOzF7RpENGd6RnRXfEPZ5/Wq6Nlp18QgegK0Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667814964; a=rsa-sha256; cv=none; b=OJzA/ZRsY08Prr+o0pT0cRwZJEO1sanEDEucLHoe2zGzmRk6ThkA9RotHBNzMXjDDvprEy cEW6YelobWHhvX9Fy6YSAskgIJ45DOxW3CeLpx9SIi3dSntanh4IGwWRZf+KFA+wr9ryR2 C4NbfEx+VRc93JFqh5TGrIKHYqOX66BbBNQ4LDp5evQJqw3xOHVcR4+/SpxBsPAC5v/8G7 O3HK/O+pzxqsdRt0a1ewwtCWdIPaAwSTYJe28KO97qocjIQBvjxBJPku8B+SfiS6yrpjha 9lLTvH4rhfxgKJTFo+jPm/vMJ+RnxL4qFH2HMqL0MDSm+WAKHPm6VQNlz6C6HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=ab3d248303471f1486cb847e1bf6d178663d0d8e commit ab3d248303471f1486cb847e1bf6d178663d0d8e Author: Robert Nagy AuthorDate: 2022-11-07 09:49:34 +0000 Commit: Rene Ladan CommitDate: 2022-11-07 09:55:53 +0000 www/ungoogled-chromium: unbreak on i386 by enforcing 8 byte alignment on i386 in partition alloc --- www/ungoogled-chromium/Makefile | 1 - ...ocator_partition__allocator_partition__alloc.cc | 16 ---------------- ...artition__allocator_partition__alloc__forward.h | 16 ++++++++++++++++ ...llocator_partition__allocator_partition__page.h | 22 ++-------------------- 4 files changed, 18 insertions(+), 37 deletions(-) diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index a8a7faa14c5d..dcbf38722427 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -15,7 +15,6 @@ LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 -BROKEN_i386= does not build due to 4k alignment PATCH_DEPENDS= gpatch:devel/patch \ ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc deleted file mode 100644 index e755ede14f65..000000000000 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc.cc.orig 2022-10-29 17:50:56 UTC -+++ base/allocator/partition_allocator/partition_alloc.cc -@@ -67,8 +67,13 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me - "maximum direct mapped allocation"); - - // Check that some of our zanier calculations worked out as expected. -+#if defined(__i386__) && defined(OS_FREEBSD) -+ static_assert(internal::kSmallestBucket >= internal::kAlignment, -+ "generic smallest bucket"); -+#else - static_assert(internal::kSmallestBucket == internal::kAlignment, - "generic smallest bucket"); -+#endif - static_assert(internal::kMaxBucketed == 983040, "generic max bucketed"); - STATIC_ASSERT_OR_PA_CHECK( - internal::MaxSystemPagesPerRegularSlotSpan() <= 16, diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h new file mode 100644 index 000000000000..fbaa149594dc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h @@ -0,0 +1,16 @@ +--- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2022-11-06 16:08:29 UTC ++++ base/allocator/partition_allocator/partition_alloc_forward.h +@@ -25,9 +25,13 @@ namespace internal { + // the second one 16. We could technically return something different for + // malloc() and operator new(), but this would complicate things, and most of + // our allocations are presumably coming from operator new() anyway. ++#if defined(__i386__) && defined(OS_FREEBSD) ++constexpr size_t kAlignment = 8; ++#else + constexpr size_t kAlignment = + std::max(alignof(max_align_t), + static_cast(__STDCPP_DEFAULT_NEW_ALIGNMENT__)); ++#endif + static_assert(kAlignment <= 16, + "PartitionAlloc doesn't support a fundamental alignment larger " + "than 16 bytes."); diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h index 7a074e66b136..bed1b712bcea 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__page.h @@ -1,14 +1,6 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2022-10-29 17:50:56 UTC +--- base/allocator/partition_allocator/partition_page.h.orig 2022-11-06 16:08:29 UTC +++ base/allocator/partition_allocator/partition_page.h -@@ -138,13 +138,14 @@ struct SlotSpanMetadata { - PartitionBucket* const bucket = nullptr; - - // CHECK()ed in AllocNewSlotSpan(). --#if defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) -+#if (defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE)) || \ -+ (BUILDFLAG(IS_FREEBSD) && defined(__i386__)) - // System page size is not a constant on Apple OSes, but is either 4 or 16kiB - // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And +@@ -144,7 +144,7 @@ struct SlotSpanMetadata { // PartitionPageSize() is 4 times the OS page size. static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket; @@ -17,13 +9,3 @@ // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, // so we use the 16 kiB maximum (64 kiB will crash). -@@ -158,7 +159,9 @@ struct SlotSpanMetadata { - #endif // defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) - // The maximum number of bits needed to cover all currently supported OSes. - static constexpr size_t kMaxSlotsPerSlotSpanBits = 13; -+#if !BUILDFLAG(IS_FREEBSD) && defined(__i386__) - static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), ""); -+#endif - - // |marked_full| isn't equivalent to being full. Slot span is marked as full - // iff it isn't on the active slot span list (or any other list).