1 |
commit: abbbcef1980f446577f34a1f30c42f2fad90efa7 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat May 30 16:50:21 2020 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 30 23:31:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abbbcef1 |
7 |
|
8 |
dev-util/valgrind: remove unused patches |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com> |
12 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
13 |
|
14 |
...ept-read-only-PT_LOAD-segments-and-rodata.patch | 95 ---------------------- |
15 |
...further-mappings-after-read-all-debuginfo.patch | 70 ---------------- |
16 |
.../files/valgrind-3.13.0-test-fixes.patch | 29 ------- |
17 |
.../files/valgrind-3.13.0-xml-socket.patch | 27 ------ |
18 |
.../files/valgrind-3.7.0-fno-stack-protector.patch | 12 --- |
19 |
5 files changed, 233 deletions(-) |
20 |
|
21 |
diff --git a/dev-util/valgrind/files/valgrind-3.13.0-accept-read-only-PT_LOAD-segments-and-rodata.patch b/dev-util/valgrind/files/valgrind-3.13.0-accept-read-only-PT_LOAD-segments-and-rodata.patch |
22 |
deleted file mode 100644 |
23 |
index 41f73b43f35..00000000000 |
24 |
--- a/dev-util/valgrind/files/valgrind-3.13.0-accept-read-only-PT_LOAD-segments-and-rodata.patch |
25 |
+++ /dev/null |
26 |
@@ -1,95 +0,0 @@ |
27 |
-See https://bugs.gentoo.org/664882 |
28 |
- |
29 |
-From 64aa729bfae71561505a40c12755bd6b55bb3061 Mon Sep 17 00:00:00 2001 |
30 |
-From: Mark Wielaard <mark@×××××.org> |
31 |
-Date: Thu, 12 Jul 2018 13:56:00 +0200 |
32 |
-Subject: [PATCH] Accept read-only PT_LOAD segments and .rodata. |
33 |
- |
34 |
-The new binutils ld -z separate-code option creates multiple read-only |
35 |
-PT_LOAD segments and might place .rodata in a non-executable segment. |
36 |
- |
37 |
-Allow and keep track of separate read-only segments and allow a readonly |
38 |
-page with .rodata section. |
39 |
- |
40 |
-Based on patches from Tom Hughes <tom@×××××××.nu> and |
41 |
-H.J. Lu <hjl.tools@×××××.com>. |
42 |
- |
43 |
-https://bugs.kde.org/show_bug.cgi?id=395682 |
44 |
---- |
45 |
- coregrind/m_debuginfo/debuginfo.c | 2 -- |
46 |
- coregrind/m_debuginfo/readelf.c | 34 +++++++++++++++++++++++-------- |
47 |
- 3 files changed, 27 insertions(+), 10 deletions(-) |
48 |
- |
49 |
---- a/coregrind/m_debuginfo/debuginfo.c |
50 |
-+++ b/coregrind/m_debuginfo/debuginfo.c |
51 |
-@@ -957,9 +957,7 @@ |
52 |
- # error "Unknown platform" |
53 |
- # endif |
54 |
- |
55 |
--# if defined(VGP_x86_darwin) && DARWIN_VERS >= DARWIN_10_7 |
56 |
- is_ro_map = seg->hasR && !seg->hasW && !seg->hasX; |
57 |
--# endif |
58 |
- |
59 |
- # if defined(VGO_solaris) |
60 |
- is_rx_map = seg->hasR && seg->hasX && !seg->hasW; |
61 |
---- a/coregrind/m_debuginfo/readelf.c |
62 |
-+++ b/coregrind/m_debuginfo/readelf.c |
63 |
-@@ -1785,7 +1785,7 @@ |
64 |
- Bool loaded = False; |
65 |
- for (j = 0; j < VG_(sizeXA)(di->fsm.maps); j++) { |
66 |
- const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, j); |
67 |
-- if ( (map->rx || map->rw) |
68 |
-+ if ( (map->rx || map->rw || map->ro) |
69 |
- && map->size > 0 /* stay sane */ |
70 |
- && a_phdr.p_offset >= map->foff |
71 |
- && a_phdr.p_offset < map->foff + map->size |
72 |
-@@ -1816,6 +1816,16 @@ |
73 |
- i, (UWord)item.bias); |
74 |
- loaded = True; |
75 |
- } |
76 |
-+ if (map->ro |
77 |
-+ && (a_phdr.p_flags & (PF_R | PF_W | PF_X)) |
78 |
-+ == PF_R) { |
79 |
-+ item.exec = False; |
80 |
-+ VG_(addToXA)(svma_ranges, &item); |
81 |
-+ TRACE_SYMTAB( |
82 |
-+ "PT_LOAD[%ld]: acquired as ro, bias 0x%lx\n", |
83 |
-+ i, (UWord)item.bias); |
84 |
-+ loaded = True; |
85 |
-+ } |
86 |
- } |
87 |
- } |
88 |
- if (!loaded) { |
89 |
-@@ -2083,17 +2093,25 @@ |
90 |
- } |
91 |
- } |
92 |
- |
93 |
-- /* Accept .rodata where mapped as rx (data), even if zero-sized */ |
94 |
-+ /* Accept .rodata where mapped as rx or rw (data), even if zero-sized */ |
95 |
- if (0 == VG_(strcmp)(name, ".rodata")) { |
96 |
-- if (inrx && !di->rodata_present) { |
97 |
-- di->rodata_present = True; |
98 |
-+ if (!di->rodata_present) { |
99 |
- di->rodata_svma = svma; |
100 |
-- di->rodata_avma = svma + inrx->bias; |
101 |
-+ di->rodata_avma = svma; |
102 |
- di->rodata_size = size; |
103 |
-- di->rodata_bias = inrx->bias; |
104 |
- di->rodata_debug_svma = svma; |
105 |
-- di->rodata_debug_bias = inrx->bias; |
106 |
-- /* NB was 'inrw' prior to r11794 */ |
107 |
-+ if (inrx) { |
108 |
-+ di->rodata_avma += inrx->bias; |
109 |
-+ di->rodata_bias = inrx->bias; |
110 |
-+ di->rodata_debug_bias = inrx->bias; |
111 |
-+ } else if (inrw) { |
112 |
-+ di->rodata_avma += inrw->bias; |
113 |
-+ di->rodata_bias = inrw->bias; |
114 |
-+ di->rodata_debug_bias = inrw->bias; |
115 |
-+ } else { |
116 |
-+ BAD(".rodata"); |
117 |
-+ } |
118 |
-+ di->rodata_present = True; |
119 |
- TRACE_SYMTAB("acquiring .rodata svma = %#lx .. %#lx\n", |
120 |
- di->rodata_svma, |
121 |
- di->rodata_svma + di->rodata_size - 1); |
122 |
|
123 |
diff --git a/dev-util/valgrind/files/valgrind-3.13.0-ignore-further-mappings-after-read-all-debuginfo.patch b/dev-util/valgrind/files/valgrind-3.13.0-ignore-further-mappings-after-read-all-debuginfo.patch |
124 |
deleted file mode 100644 |
125 |
index 5b47512c155..00000000000 |
126 |
--- a/dev-util/valgrind/files/valgrind-3.13.0-ignore-further-mappings-after-read-all-debuginfo.patch |
127 |
+++ /dev/null |
128 |
@@ -1,70 +0,0 @@ |
129 |
-Follow up for valgrind-3.13.0-accept-read-only-PT_LOAD-segments-and-rodata.patch. |
130 |
- |
131 |
-From e752326cc050803c3bcfde1f8606bead66ff9642 Mon Sep 17 00:00:00 2001 |
132 |
-From: Julian Seward <jseward@×××.org> |
133 |
-Date: Tue, 14 Aug 2018 10:13:46 +0200 |
134 |
-Subject: [PATCH] VG_(di_notify_mmap): once we've read debuginfo for an object, |
135 |
- ignore all further mappings. n-i-bz. |
136 |
- |
137 |
-Once we've read debuginfo for an object, ignore all further mappings. If we |
138 |
-don't do that, applications that mmap in their own objects to inspect them for |
139 |
-whatever reason, will cause "irrelevant" mappings to be recorded in the |
140 |
-object's fsm.maps table. This can lead to serious problems later on. |
141 |
- |
142 |
-This has become necessary because 64aa729bfae71561505a40c12755bd6b55bb3061 of |
143 |
-Thu Jul 12 2018 (the fix for bug 395682) started recording readonly segments |
144 |
-in the fsm.maps table, where before they were ignored. |
145 |
---- |
146 |
- coregrind/m_debuginfo/debuginfo.c | 29 ++++++++++++++++++++++++++++- |
147 |
- 1 file changed, 28 insertions(+), 1 deletion(-) |
148 |
- |
149 |
-diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c |
150 |
-index c36d498..55c05cb 100644 |
151 |
---- a/coregrind/m_debuginfo/debuginfo.c |
152 |
-+++ b/coregrind/m_debuginfo/debuginfo.c |
153 |
-@@ -1200,6 +1200,32 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) |
154 |
- di = find_or_create_DebugInfo_for( filename ); |
155 |
- vg_assert(di); |
156 |
- |
157 |
-+ /* Ignore all mappings for this filename once we've read debuginfo for it. |
158 |
-+ This avoids the confusion of picking up "irrelevant" mappings in |
159 |
-+ applications which mmap their objects outside of ld.so, for example |
160 |
-+ Firefox's Gecko profiler. |
161 |
-+ |
162 |
-+ What happens in that case is: the application maps the object "ro" for |
163 |
-+ whatever reason. We record the mapping di->fsm.maps. The application |
164 |
-+ later unmaps the object. However, the mapping is not removed from |
165 |
-+ di->fsm.maps. Later, when some other (unrelated) object is mapped (via |
166 |
-+ ld.so) into that address space, we first unload any debuginfo that has a |
167 |
-+ mapping intersecting that area. That means we will end up incorrectly |
168 |
-+ unloading debuginfo for the object with the "irrelevant" mappings. This |
169 |
-+ causes various problems, not least because it can unload the debuginfo |
170 |
-+ for libc.so and so cause malloc intercepts to become un-intercepted. |
171 |
-+ |
172 |
-+ This fix assumes that all mappings made once we've read debuginfo for |
173 |
-+ an object are irrelevant. I think that's OK, but need to check with |
174 |
-+ mjw/thh. */ |
175 |
-+ if (di->have_dinfo) { |
176 |
-+ if (debug) |
177 |
-+ VG_(printf)("di_notify_mmap-4x: " |
178 |
-+ "ignoring mapping because we already read debuginfo " |
179 |
-+ "for DebugInfo* %p\n", di); |
180 |
-+ return 0; |
181 |
-+ } |
182 |
-+ |
183 |
- if (debug) |
184 |
- VG_(printf)("di_notify_mmap-4: " |
185 |
- "noting details in DebugInfo* at %p\n", di); |
186 |
-@@ -1220,7 +1246,8 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) |
187 |
- di->fsm.have_ro_map |= is_ro_map; |
188 |
- |
189 |
- /* So, finally, are we in an accept state? */ |
190 |
-- if (di->fsm.have_rx_map && di->fsm.have_rw_map && !di->have_dinfo) { |
191 |
-+ vg_assert(!di->have_dinfo); |
192 |
-+ if (di->fsm.have_rx_map && di->fsm.have_rw_map) { |
193 |
- /* Ok, so, finally, we found what we need, and we haven't |
194 |
- already read debuginfo for this object. So let's do so now. |
195 |
- Yee-ha! */ |
196 |
--- |
197 |
-2.9.3 |
198 |
- |
199 |
|
200 |
diff --git a/dev-util/valgrind/files/valgrind-3.13.0-test-fixes.patch b/dev-util/valgrind/files/valgrind-3.13.0-test-fixes.patch |
201 |
deleted file mode 100644 |
202 |
index 9bdd29013ba..00000000000 |
203 |
--- a/dev-util/valgrind/files/valgrind-3.13.0-test-fixes.patch |
204 |
+++ /dev/null |
205 |
@@ -1,29 +0,0 @@ |
206 |
-See: |
207 |
-https://bugs.gentoo.org/637488 |
208 |
-https://bugs.kde.org/show_bug.cgi?id=387686 |
209 |
- |
210 |
-commit 2b5eab6a8db1b0487a3ad7fc4e7eeda6d3513626 |
211 |
-Author: Mark Wielaard <mark@×××××.org> |
212 |
-Date: Thu Jun 29 15:26:30 2017 +0000 |
213 |
- |
214 |
- memcheck/tests: Use ucontext_t instead of struct ucontext |
215 |
- |
216 |
- glibc 2.26 does not expose struct ucontext anymore. |
217 |
- |
218 |
- Signed-off-by: Khem Raj <raj.khem@×××××.com> |
219 |
- |
220 |
- git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16457 |
221 |
- |
222 |
-diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c |
223 |
-index a978fc2b0..7f97b90a5 100644 |
224 |
---- a/memcheck/tests/linux/stack_changes.c |
225 |
-+++ b/memcheck/tests/linux/stack_changes.c |
226 |
-@@ -10,7 +10,7 @@ |
227 |
- // This test is checking the libc context calls (setcontext, etc.) and |
228 |
- // checks that Valgrind notices their stack changes properly. |
229 |
- |
230 |
--typedef struct ucontext mycontext; |
231 |
-+typedef ucontext_t mycontext; |
232 |
- |
233 |
- mycontext ctx1, ctx2, oldc; |
234 |
- int count; |
235 |
|
236 |
diff --git a/dev-util/valgrind/files/valgrind-3.13.0-xml-socket.patch b/dev-util/valgrind/files/valgrind-3.13.0-xml-socket.patch |
237 |
deleted file mode 100644 |
238 |
index 56039c48bc2..00000000000 |
239 |
--- a/dev-util/valgrind/files/valgrind-3.13.0-xml-socket.patch |
240 |
+++ /dev/null |
241 |
@@ -1,27 +0,0 @@ |
242 |
-From: Ivo Raisr <ivosh@×××××.net> |
243 |
-Date: Thu, 3 Aug 2017 05:22:01 +0000 (+0000) |
244 |
-Subject: Fix handling command line option --xml-socket. |
245 |
-X-Git-Url: https://sourceware.org/git/?p=valgrind.git;a=commitdiff_plain;h=34dd8493de39314033509bb7ad62673f33dcf3db |
246 |
- |
247 |
-Fix handling command line option --xml-socket. |
248 |
-Fixes BZ#382998 |
249 |
-Patch by: Orgad Shaneh <orgads@×××××.com> |
250 |
- |
251 |
- |
252 |
- |
253 |
-git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16467 |
254 |
---- |
255 |
- |
256 |
-diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c |
257 |
-index d66c67d..f6ba202 100644 |
258 |
---- a/coregrind/m_libcprint.c |
259 |
-+++ b/coregrind/m_libcprint.c |
260 |
-@@ -526,7 +526,7 @@ void VG_(init_log_xml_sinks)(VgLogTo log_to, VgLogTo xml_to, |
261 |
- break; |
262 |
- |
263 |
- case VgLogTo_Socket: |
264 |
-- log_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded), |
265 |
-+ xml_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded), |
266 |
- &VG_(xml_output_sink), True); |
267 |
- break; |
268 |
- } |
269 |
|
270 |
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch b/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch |
271 |
deleted file mode 100644 |
272 |
index 6af45531956..00000000000 |
273 |
--- a/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch |
274 |
+++ /dev/null |
275 |
@@ -1,12 +0,0 @@ |
276 |
-diff -Naur valgrind-3.7.0.orig//Makefile.all.am valgrind-3.7.0/Makefile.all.am |
277 |
---- valgrind-3.7.0.orig//Makefile.all.am 2011-10-26 17:24:45.000000000 -0400 |
278 |
-+++ valgrind-3.7.0/Makefile.all.am 2011-11-10 16:18:18.000000000 -0500 |
279 |
-@@ -82,7 +82,7 @@ |
280 |
- # performance and get whatever useful warnings we can out of gcc. |
281 |
- # -fno-builtin is important for defeating LLVM's idiom recognition |
282 |
- # that somehow causes VG_(memset) to get into infinite recursion. |
283 |
--AM_CFLAGS_BASE = \ |
284 |
-+AM_CFLAGS_BASE = -fno-stack-protector \ |
285 |
- -O2 -g \ |
286 |
- -Wall \ |
287 |
- -Wmissing-prototypes \ |