Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/
Date: Wed, 02 Aug 2017 21:28:11
Message-Id: 1501709282.36ef217b856a8f4e21f57875d12cd51246c35e7e.floppym@gentoo
1 commit: 36ef217b856a8f4e21f57875d12cd51246c35e7e
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 2 21:27:52 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 2 21:28:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36ef217b
7
8 www-client/chromium: fix conflicting usage of major/minor
9
10 Some debug code defined these as local variables, which seems to cause
11 a build failure against glibc-2.25.
12
13 Bug: https://bugs.gentoo.org/626744
14 Package-Manager: Portage-2.3.6_p23, Repoman-2.3.3_p1
15
16 www-client/chromium/chromium-60.0.3112.78.ebuild | 1 +
17 .../chromium/files/chromium-major-minor.patch | 97 ++++++++++++++++++++++
18 2 files changed, 98 insertions(+)
19
20 diff --git a/www-client/chromium/chromium-60.0.3112.78.ebuild b/www-client/chromium/chromium-60.0.3112.78.ebuild
21 index 68b83b6a24a..00e68336525 100644
22 --- a/www-client/chromium/chromium-60.0.3112.78.ebuild
23 +++ b/www-client/chromium/chromium-60.0.3112.78.ebuild
24 @@ -185,6 +185,7 @@ src_prepare() {
25 "${FILESDIR}/${PN}-widevine-r1.patch"
26 "${FILESDIR}/${PN}-FORTIFY_SOURCE-r1.patch"
27 "${FILESDIR}/${PN}-gn-bootstrap-r8.patch"
28 + "${FILESDIR}/${PN}-major-minor.patch"
29 )
30
31 default
32
33 diff --git a/www-client/chromium/files/chromium-major-minor.patch b/www-client/chromium/files/chromium-major-minor.patch
34 new file mode 100644
35 index 00000000000..ab8a701c6c1
36 --- /dev/null
37 +++ b/www-client/chromium/files/chromium-major-minor.patch
38 @@ -0,0 +1,97 @@
39 +From 11e48b29d00fdd714c3ff3f8ebe0d51a2c4ce61c Mon Sep 17 00:00:00 2001
40 +From: Dongseong Hwang <dongseong.hwang@×××××.com>
41 +Date: Tue, 11 Jul 2017 17:20:06 +0000
42 +Subject: [PATCH] ozone: drm: Remove the debug details when dmabuf mmap fails.
43 +
44 +As we fixed mmap failure, remove the redundant crash reports.
45 +The CL adding the info: crrev.com/2710183005
46 +
47 +BUG=629521
48 +
49 +Change-Id: I8de9f16a3fce4a42500fe9c5e2843615940e184e
50 +Reviewed-on: https://chromium-review.googlesource.com/565805
51 +Reviewed-by: Daniele Castagna <dcastagna@××××××××.org>
52 +Reviewed-by: Robert Sesek <rsesek@××××××××.org>
53 +Reviewed-by: Dongseong Hwang <dongseong.hwang@×××××.com>
54 +Commit-Queue: Dongseong Hwang <dongseong.hwang@×××××.com>
55 +Cr-Commit-Position: refs/heads/master@{#485662}
56 +---
57 + chrome/common/crash_keys.cc | 5 -----
58 + ui/gfx/linux/client_native_pixmap_dmabuf.cc | 28 +++-------------------------
59 + 2 files changed, 3 insertions(+), 30 deletions(-)
60 +
61 +diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
62 +index c4b563e0309b..2f1efe6f2334 100644
63 +--- a/chrome/common/crash_keys.cc
64 ++++ b/chrome/common/crash_keys.cc
65 +@@ -153,11 +153,6 @@ size_t RegisterChromeCrashKeys() {
66 + {kInputEventFilterSendFailure, kSmallSize},
67 + #if defined(OS_CHROMEOS)
68 + {kNumberOfUsers, kSmallSize},
69 +- // Temporary for https://crbug.com/629521
70 +- {"mmap_params", kSmallSize},
71 +- {"buffer_size", kSmallSize},
72 +- {"errno", kSmallSize},
73 +- {"number_of_fds", kSmallSize},
74 + #endif
75 + #if defined(OS_MACOSX)
76 + {mac::kFirstNSException, kMediumSize},
77 +diff --git a/ui/gfx/linux/client_native_pixmap_dmabuf.cc b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
78 +index 4927daf3a61d..e532686a4f5b 100644
79 +--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
80 ++++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
81 +@@ -11,11 +11,9 @@
82 + #include <sys/mman.h>
83 + #include <xf86drm.h>
84 +
85 +-#include "base/debug/crash_logging.h"
86 + #include "base/memory/ptr_util.h"
87 + #include "base/posix/eintr_wrapper.h"
88 + #include "base/process/memory.h"
89 +-#include "base/process/process_metrics.h"
90 + #include "base/strings/stringprintf.h"
91 + #include "base/trace_event/trace_event.h"
92 +
93 +@@ -87,36 +85,16 @@ ClientNativePixmapDmaBuf::ClientNativePixmapDmaBuf(
94 + if (mmap_error == ENOMEM)
95 + base::TerminateBecauseOutOfMemory(map_size);
96 +
97 +- // TODO(dcastagna): Remove the following diagnostic information and the
98 +- // associated crash keys once crbug.com/629521 is fixed.
99 + bool fd_valid = fcntl(dmabuf_fd_.get(), F_GETFD) != -1 ||
100 + logging::GetLastSystemErrorCode() != EBADF;
101 +- int minor = -1;
102 +- int major = -1;
103 +- struct stat buf;
104 +- if (!fstat(dmabuf_fd_.get(), &buf)) {
105 +- minor = minor(buf.st_dev);
106 +- major = major(buf.st_dev);
107 +- }
108 +-
109 + std::string mmap_params = base::StringPrintf(
110 + "(addr=nullptr, length=%zu, prot=(PROT_READ | PROT_WRITE), "
111 +- "flags=MAP_SHARED, fd=%d[valid=%d, minor=%d, major=%d], offset=0)",
112 +- map_size, dmabuf_fd_.get(), fd_valid, minor, major);
113 ++ "flags=MAP_SHARED, fd=%d[valid=%d], offset=0)",
114 ++ map_size, dmabuf_fd_.get(), fd_valid);
115 + std::string errno_str = logging::SystemErrorCodeToString(mmap_error);
116 +- std::unique_ptr<base::ProcessMetrics> process_metrics(
117 +- base::ProcessMetrics::CreateCurrentProcessMetrics());
118 +- std::string number_of_fds =
119 +- base::StringPrintf("%d", process_metrics->GetOpenFdCount());
120 +- base::debug::ScopedCrashKey params_crash_key("mmap_params", mmap_params);
121 +- base::debug::ScopedCrashKey size_crash_key("buffer_size", size.ToString());
122 +- base::debug::ScopedCrashKey errno_crash_key("errno", errno_str);
123 +- base::debug::ScopedCrashKey number_of_fds_crash_key("number_of_fds",
124 +- number_of_fds);
125 + LOG(ERROR) << "Failed to mmap dmabuf; mmap_params: " << mmap_params
126 + << ", buffer_size: (" << size.ToString()
127 +- << "), errno: " << errno_str
128 +- << " , number_of_fds: " << number_of_fds;
129 ++ << "), errno: " << errno_str;
130 + LOG(ERROR) << "NativePixmapHandle:";
131 + LOG(ERROR) << "Number of fds: " << handle.fds.size();
132 + LOG(ERROR) << "Number of planes: " << handle.planes.size();
133 +--
134 +2.13.3
135 +