FreeBSD Bugzilla – Attachment 232048 Details for
Bug 255561
www/chromium: Video playback error (Chromium-only, other browsers unaffected)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-try-MADV_FREE-and-then-fallback-to-MADV_DONTNEED-for.patch
0001-try-MADV_FREE-and-then-fallback-to-MADV_DONTNEED-for.patch (text/plain), 3.07 KB, created by
Robert Nagy
on 2022-02-23 16:15:04 UTC
(
hide
)
Description:
0001-try-MADV_FREE-and-then-fallback-to-MADV_DONTNEED-for.patch
Filename:
MIME Type:
Creator:
Robert Nagy
Created:
2022-02-23 16:15:04 UTC
Size:
3.07 KB
patch
obsolete
>From df115f870548dda1945ca677bffc2fa024fc7b8e Mon Sep 17 00:00:00 2001 >From: Robert Nagy <robert@openbsd.org> >Date: Wed, 23 Feb 2022 17:12:25 +0100 >Subject: [PATCH] try MADV_FREE and then fallback to MADV_DONTNEED for *BSD and > return false for DecommittedMemoryIsAlwaysZeroed() so that the partition > allocator is not confused causing weird video playback issues > >--- > www/chromium/Makefile | 1 + > ...ocator_partition__allocator_page__allocator.h | 11 +++++++++++ > ...allocator_page__allocator__internals__posix.h | 16 ++++++++++++++++ > 3 files changed, 28 insertions(+) > create mode 100644 www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h > create mode 100644 www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h > >diff --git a/www/chromium/Makefile b/www/chromium/Makefile >index d8adb70ae88c..cc137ed98bf4 100644 >--- a/www/chromium/Makefile >+++ b/www/chromium/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= chromium > PORTVERSION= 98.0.4758.102 >+PORTREVISION= 1 > CATEGORIES= www > MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ > LOCAL/rene/chromium/:fonts >diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h >new file mode 100644 >index 000000000000..3d932a28ff32 >--- /dev/null >+++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h >@@ -0,0 +1,11 @@ >+--- base/allocator/partition_allocator/page_allocator.h.orig 2022-02-23 16:08:07 UTC >++++ base/allocator/partition_allocator/page_allocator.h >+@@ -170,7 +170,7 @@ BASE_EXPORT void DecommitAndZeroSystemPages(void* addr >+ // Whether decommitted memory is guaranteed to be zeroed when it is >+ // recommitted. Do not assume that this will not change over time. >+ constexpr BASE_EXPORT bool DecommittedMemoryIsAlwaysZeroed() { >+-#if defined(OS_APPLE) >++#if defined(OS_APPLE) || defined(OS_BSD) >+ return false; >+ #else >+ return true; >diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h >new file mode 100644 >index 000000000000..c5069330b3dd >--- /dev/null >+++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h >@@ -0,0 +1,16 @@ >+--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-02-23 16:08:07 UTC >++++ base/allocator/partition_allocator/page_allocator_internals_posix.h >+@@ -339,8 +339,12 @@ bool TryRecommitSystemPagesInternal( >+ } >+ >+ void DiscardSystemPagesInternal(void* address, size_t length) { >+-#if defined(OS_APPLE) >++#if defined(OS_APPLE) || defined(OS_BSD) >++#if defined(OS_BSD) >++ int ret = madvise(address, length, MADV_FREE); >++#else >+ int ret = madvise(address, length, MADV_FREE_REUSABLE); >++#endif >+ if (ret) { >+ // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. >+ ret = madvise(address, length, MADV_DONTNEED); >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255561
: 232048