apply patch to fix sigsegv with video playing (https://bugs.chromium.org/p/chromium/issues/detail?id=1095962) [release 83.0.4103.116-3mamba;Mon Jun 29 2020]

This commit is contained in:
Silvan Calarco 2024-01-05 21:13:36 +01:00
parent fd3be85515
commit e182adc946
3 changed files with 101 additions and 3 deletions

View File

@ -0,0 +1,41 @@
https://bugs.chromium.org/p/chromium/issues/detail?id=1095962
--- /media/base/media.cc
+++ /media/base/media.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include "media/base/media.h"
#include "base/allocator/buildflags.h"
@@ -41,7 +43,7 @@
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
#endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
#endif // BUILDFLAG(ENABLE_FFMPEG)
--- /third_party/ffmpeg/chromium/dllmain.cc
+++ /third_party/ffmpeg/chromium/dllmain.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <intrin.h>
+#include <limits>
#include <new.h>
#include <stdlib.h>
#include <windows.h>
@@ -28,7 +29,7 @@
if (reason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(instance);
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
// Enable OOM crashes in the shim for all malloc calls that fail.
_set_new_mode(1);
_set_new_handler(&OnNoMemory);

View File

@ -0,0 +1,40 @@
From 9ff06536caf7ea51aad9fd2bb649c858eaf7ee84 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshanbiswas@fedoraproject.org>
Date: Sat, 26 Oct 2019 10:06:30 +0530
Subject: [PATCH] Move offending function to chromeos only
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -66,6 +66,7 @@ void ReportToUMA(VAVDADecoderFailure fai
VAVDA_DECODER_FAILURES_MAX + 1);
}
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
// Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
// Lake) Cpu platform id's are referenced from the following file in kernel
// source arch/x86/include/asm/intel-family.h
@@ -78,6 +79,7 @@ bool IsGeminiLakeOrLater() {
cpuid.model() >= kGeminiLakeModelId;
return is_geminilake_or_later;
}
+#endif
} // namespace
@@ -1155,6 +1157,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
return BufferAllocationMode::kNormal;
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+ // Move this to chromeOs only as it is causing problem in some intel linux drivers
// On Gemini Lake, Kaby Lake and later we can pass to libva the client's
// PictureBuffers to decode onto, which skips the use of the Vpp unit and its
// associated format reconciliation copy, avoiding all internal buffer
@@ -1171,6 +1175,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
num_extra_pics_ = 3;
return BufferAllocationMode::kNone;
}
+#endif
// If we're here, we have to use the Vpp unit and allocate buffers for
// |decoder_|; usually we'd have to allocate the |decoder_|s

View File

@ -1,7 +1,7 @@
Name: chromium
Epoch: 3
Version: 83.0.4103.97
Release: 1mamba
Version: 83.0.4103.116
Release: 3mamba
Summary: An open-source browser project that aims to build a safer, faster, and more stable way to experience the web
Group: Graphical Desktop/Applications/Internet
Vendor: openmamba
@ -67,6 +67,8 @@ Patch61: chromium-83.0.4103.61-make-some-of-blink-custom-iterators-STL-com
Patch62: chromium-83.0.4103.61-nclude-memory-header-to-get-the-definition-of-std-u.patch
Patch63: chromium-83.0.4103.61-v8-remove-soon-to-be-removed-getAllFieldPositions.patch
Patch64: chromium-83.0.4103.83-avoid-double-destruction-of-ServiceWorkerObjectHost.patch
Patch65: chromium-83.0.4103.116-fix-vaapi-on-intel.patch
Patch66: chromium-83.0.4103.116-ffmpeg-4.3.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -190,6 +192,8 @@ Chromium is an open-source browser project that aims to build a safer, faster, a
%patch62 -p1
%patch63 -p1 -d v8
%patch64 -p1
%patch65 -p1
%patch66 -p1
# Allow building against system libraries in official builds
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
@ -305,6 +309,7 @@ chromium_conf=(
'use_custom_libcxx=false'
'enable_hangout_services_extension=true'
'enable_widevine=true'
'use_vaapi=true'
'enable_nacl=false'
'enable_swiftshader=false'
'google_api_key="AIzaSyBT3wXwxmFuUQcyeMyp0MbHHhhFwNfWKTc"'
@ -464,6 +469,18 @@ ln -s %{_libdir}/chromium/chromedriver %{buildroot}%{_bindir}/chromedriver
%{_mandir}/man1/chromium.1*
%changelog
* Mon Jun 29 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 83.0.4103.116-3mamba
- apply patch to fix sigsegv with video playing (https://bugs.chromium.org/p/chromium/issues/detail?id=1095962)
* Wed Jun 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 83.0.4103.116-2mamba
- added use-vaapi=true and fix-vaapi-on-intel patch to fix crashing while playing videos
* Tue Jun 23 2020 Automatic Build System <autodist@mambasoft.it> 83.0.4103.116-1mamba
- automatic version update by autodist
* Tue Jun 16 2020 Automatic Build System <autodist@mambasoft.it> 83.0.4103.106-1mamba
- automatic version update by autodist
* Thu Jun 04 2020 Automatic Build System <autodist@mambasoft.it> 83.0.4103.97-1mamba
- automatic version update by autodist