summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2020-12-01 15:13:57 +0100
committerDodji Seketeli <dodji@redhat.com>2020-12-01 15:13:57 +0100
commitcee237e25e9d46b64e410d48b722a56fd06c5b87 (patch)
tree33f64c6e99eba9984278c197d565f97e4d22ff8a /ChangeLog
parentAdd check-self-compare to release regression testing (diff)
downloadlibabigail-cee237e25e9d46b64e410d48b722a56fd06c5b87.tar.gz
libabigail-cee237e25e9d46b64e410d48b722a56fd06c5b87.tar.bz2
libabigail-cee237e25e9d46b64e410d48b722a56fd06c5b87.tar.xz
Update the Changelog for 1.8
* Changelog: Update automatically with "make update-changelog' Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog3882
1 files changed, 3882 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 64e6ce52..c810deae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,3885 @@
12020-12-01 Dodji Seketeli <dodji@redhat.com>
2
3 Add check-self-compare to release regression testing
4 * Makefile.am: Make 'make tarball-and-all' run the
5 'check-self-compare' target as part of the release process.
6
72020-12-01 Dodji Seketeli <dodji@redhat.com>
8
9 configure: add --enable-rpm415 option
10 * configure: Introduce the --{en, dis}able-rpm415 option.
11
122020-11-30 Dodji Seketeli <dodji@redhat.com>
13
14 dwarf-reader: Bug 26908 - don't crash on empty DW_TAG_partial_unit
15 * src/abg-dwarf-reader.cc (die_has_children): Define new static
16 function.
17 (read_context::build_die_parent_relations_under): Do not try to
18 instantiate an imported_unit_point type for an imported unit with
19 no children node.
20 (imported_unit_point::imported_unit_point): Assert that the
21 imported die has a sub-tree.
22 (imported_unit_point::imported_unit_point): Remove useless spaces.
23
242020-11-27 Dodji Seketeli <dodji@redhat.com>
25
26 reader: Fix off-by-one error in assert
27 * src/abg-reader.cc (build_subrange_type): Fix off-by-one error.
28
292020-11-27 Dodji Seketeli <dodji@redhat.com>
30
31 writer: fix off-by-one error in assertion
32 * src/abg-writer.cc (write_array_subrange_type): Fix off-by-one
33 error in assertion.
34 * src/abg-dwarf-reader.cc (build_subrange_type): Assert the length
35 of the array complies with its bounds.
36
372020-11-27 Dodji Seketeli <dodji@redhat.com>
38
39 abipkgdiff: make --self-check to fail on any change against own ABIXML
40 * tools/abipkgdiff.cc (compare_to_self): Report *any* ABI change.
41 Not just the "net" changes.
42
432020-11-26 Dodji Seketeli <dodji@redhat.com>
44
45 abidw: make --abidiff report any change against own ABIXML
46 * tools/abidw.cc (load_corpus_and_write_abixml): Emit an error
47 when comparing the binary to its ABIXML representation yields any
48 change.
49
502020-11-27 Dodji Seketeli <dodji@redhat.com>
51
52 dwarf-reader: Avoid having several functions with the same symbol
53 * src/abg-dwarf-reader.cc
54 (read_context::symbol_already_belongs_to_a_function): Define new
55 member function.
56 (read_context::fixup_functions_with_no_symbols): Use the new
57 symbol_already_belongs_to_a_function function to avoid setting a
58 symbol that already belongs to a function.
59 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
60 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
61 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
62 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
63 Likewise.
64
652020-11-27 Dodji Seketeli <dodji@redhat.com>
66
67 reader: Don't lose anonymous-ness of decl-only classes
68 * src/abg-reader.cc (build_class_decl): Set the is-anonymous flag
69 when reading a decl-only class.
70
712020-11-27 Dodji Seketeli <dodji@redhat.com>
72
73 ir: Introduce internal pretty representation for anonymous classes
74 * include/abg-fwd.h (get_class_or_union_flat_representation):
75 Introduce an "internal" parameter.
76 * src/abg-ir.cc (get_class_or_union_flat_representation):
77 Introduce an "internal" parameter. In the flat representation of
78 a class for internal purposes, always use the prefix "class" even
79 if this is a struct.
80 (get_type_name): To build an internal name for a
81 reference or pointer to an anonymous type, consider the namespace
82 name of said type.
83 (equals): In the overload for decl_base, take the namespace name
84 of anonymous decls into account when comparing them.
85 ({var_decl, union_decl}::get_pretty_representation): Adjust calls
86 to get_class_or_union_flat_representation to pass a proper
87 "internal" argument.
88 * src/abg-default-reporter.cc (default_reporter::report): Adjust
89 the call to get_class_or_union_flat_representation to pass an
90 "internal" argument set to 'false'.
91 * tests/data/test-annotate/libtest23.so.abi: Adjust.
92 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
93 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
94 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
95 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
96 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
97 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
98 * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
99
1002020-11-26 Dodji Seketeli <dodji@redhat.com>
101
102 writer: Emit definitions of declarations when they are present
103 * src/abg-writer.cc (write_class_decl, write_union_decl): Get the
104 definition of the declaration if it exists and emit that.
105 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
106 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
107 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
108 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
109 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
110 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
111
1122020-11-26 Dodji Seketeli <dodji@redhat.com>
113
114 Bug 26780 - Fix array subrange bounds (de)serialization
115 * src/abg-reader.cc (build_subrange_type): Read lower-bound
116 attribute if present. Then try to read upper-bound attribute as
117 well. If this is not an infinite subrange assert that the length
118 must be equal to the difference between the bounds.
119 * src/abg-writer.cc (write_array_subrange_type): Write the
120 lower-bound if it's present and not zero. In that case, write the
121 upper-bound as well.
122 * tests/data/test-diff-pkg/hdf5-1.10.6-2.fc33.x86_64.rpm: Add new
123 binary test input.
124 * tests/data/test-diff-pkg/hdf5-debuginfo-1.10.6-2.fc33.x86_64.rpm:
125 Likewise.
126 * tests/data/test-diff-pkg/hdf5-1.10.6-2.fc33.x86_64.self-check-report-0.txt:
127 Add new reference output.
128 * tests/data/Makefile.am: Add the new test material above to
129 source distribution.
130 * tests/test-diff-pkg.cc (in_out_specs): Add the binary test input
131 to the set of --self-check tests.
132
1332020-11-26 Dodji Seketeli <dodji@redhat.com>
134
135 reader: Read array subrange length into an uint64_t
136 * src/abg-reader.cc (build_subrange_type): Change the type of
137 length to uint64_t and read it using strtoull.
138
1392020-11-25 Dodji Seketeli <dodji@redhat.com>
140
141 abipkgdiff: Avoid uncertainty when sorting worker tasks
142 * elf_size_is_greater: Take the name of the binaries into account
143 when their size is equal. Also, assert that all comparison tasks
144 have compared binaries.
145
1462020-11-25 Dodji Seketeli <dodji@redhat.com>
147
148 tests/data/test-fedabipkgdiff: Update reference output
149 * tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt:
150 Adjust.
151
1522020-11-24 Matthias Maennich <maennich@google.com>
153
154 abipkgdiff: minor cleanups
155 * tools/abipkgdiff.cc: remove unused using statements
156 (self_compare_task): remove shadowing members and delegate
157 construction to base class.
158
1592020-11-23 Dodji Seketeli <dodji@redhat.com>
160
161 dwarf-reader: support artificially generated translation units
162 * configure.ac: Detect if we are running on RPM >= 4.15. If yes,
163 then define the preprocessor macro RPM_4_15. If that macro is
164 defined then test-diff-pkg.cc can support RPMs from Fedora >= 31
165 as those are compressed with zstd. Earlier RPM versions don't
166 support that compression scheme.
167 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
168 Suffix the offset of the translation unit to its name when that
169 name is "<artificial>".
170 * tests/data/test-diff-pkg/mesa-libGLU-9.0.1-3.fc33.x86_64.rpm:
171 New binary test input.
172 * tests/data/test-diff-pkg/mesa-libGLU-debuginfo-9.0.1-3.fc33.x86_64.rpm: Likewise.
173 * tests/data/test-diff-pkg/mesa-libGLU-9.0.1-3.fc33.x86_64.self-check-report-0.txt:
174 New reference output for the binary test input above.
175 * tests/data/Makefile.am: Add the new test inputs above to source
176 distribution.
177 * tests/test-diff-pkg.cc (in_out_specs): Add the binary test
178 inputs above to source distribution if we are running on an RPM
179 version >= 4.15.
180
1812020-11-20 Dodji Seketeli <dodji@redhat.com>
182
183 fedabipkgdiff: make --self-compare use abipkgdiff --self-check
184 * tools/fedabipkgdiff (abipkgdiff): If the user provides the
185 --self-compare options, generate the abipkgdiff command by using
186 the --self-check option.
187 (run_abipkgdiff): Each return value of the abipkgidiff runs can be
188 negative because they are unsigned values in essence, but as
189 python doesn't seem to have a unsigned integer type. So we need
190 to consider the max of the absolute value of the return codes
191 here.
192 * tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt:
193 Adjust.
194
1952020-11-19 Dodji Seketeli <dodji@redhat.com>
196
197 abipkgdiff: Add a new --self-check option
198 * tools/abipkgdiff.cc (options::self_check): Define new data
199 member.
200 (options::options): Initialize it.
201 (display_usage): Add help string for the --self-check option.
202 (parse_command): Parse the new --self-check option.
203 (extract_deb): Add missing newline.
204 (compare): Remove useless white space.
205 (compare_to_self, self_compare_prepared_userspace_package)
206 (self_compare_prepared_package, compare_to_self): Add new static
207 functions.
208 (class self_compare_task): Add new class.
209 (prepare_package): Add a new overload that takes just one
210 parameter.
211 (elf_size_is_greater): Don't crash if the args are empty.
212 (main): If the --self-check option is given, make sure we have
213 just one package in argument. Use the new compare_to_self
214 function to handle the --self-check option.
215 * doc/manuals/abipkgdiff.rst: Add documentation for the new
216 --self-check option.
217
2182020-11-16 Dodji Seketeli <dodji@redhat.com>
219
220 Bug 26769 - Fix missing types in abixml output
221 * include/abg-corpus.h (corpus::{record_canonical_type,
222 lookup_canonical_type}): Remove function declarations.
223 * src/abg-corpus-priv.h (corpus::priv::canonical_types_): Remove
224 data member.
225 * src/abg-corpus.cc (corpus::{record_canonical_type,
226 lookup_canonical_type}): Remove functions.
227 * src/abg-ir.cc (type_eligible_for_odr_based_comparison): Remove
228 static function.
229 (type_base::get_canonical_type_for): Don't perform the ODR-based
230 optimization for C++ anymore.
231 * src/abg-reader.cc
232 (read_context&::maybe_add_var_to_exported_decls): Don't add a
233 variable that hasn't been added to its scope. Otherwise, it means
234 we added a variable that wasn't yet properly constructed. Also
235 add a new overload for var_decl_sptr&.
236 (build_var_decl): Do not add the var to its the set of exported
237 declaration before we are sure it has been fully constructed and
238 added to the scope it belongs.
239 (build_class_decl): Only add *static* data members to the list of
240 exported declarations.
241 (handle_var_decl): A var decl seen here is a global variable
242 declaration. Add it to the list of exported declarations.
243 * src/abg-writer.cc (write_context::decl_only_type_is_emitted):
244 Constify parameter.
245 (write_translation_unit): Do not forget to emit referenced types
246 that were maybe not canonicalized. Also, avoid using noop_deleter
247 when it's not necessary.
248 (write_namespace_decl): Do not forget to emit canonicalized types
249 that are present in namespaces other than the global namespace.
250 * tests/runtestslowselfcompare.sh.in: New test that compares
251 libabigail.so against its own ABIXML representation.
252 * tests/Makefile.am: Add the new test runtestslowselfcompare.sh to
253 source distribution. This test is too slow to be run during the
254 course of 'make check'. It takes more than 5 minutes on my slow
255 box here. Rather, it can be run using 'make check-self-compare'.
256 I plan to run this before releases now.
257 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Adjust.
258 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
259 * tests/data/test-annotate/test0.abi: Likewise.
260 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
261 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
262 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
263 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
264 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
265 Likewise.
266 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
267 Likewise.
268 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
269 Likewise.
270 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
271 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
272 Likewise.
273 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
274 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
275 Likewise.
276 * tests/data/test-read-dwarf/PR26261/PR26261-exe.abi: Likewise.
277 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
278 Likewise.
279 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
280 * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
281 * tests/data/test-read-dwarf/test0.abi: Likewise.
282 * tests/data/test-read-dwarf/test0.hash.abi: Likewise.
283 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
284 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
285 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
286 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
287 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
288 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
289 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
290 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
291 Likewise.
292 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
293 Likewise.
294 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
295 Likewise.
296 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
297 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
298 Likewise.
299 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
300 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
301 Likewise.
302 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
303 Likewise.
304 * tests/data/test-read-write/test6.xml: Likewise.
305
3062020-11-13 Dodji Seketeli <dodji@redhat.com>
307
308 Make sure to canonicalize all types but decl-only classes
309 * include/abg-fwd.h (is_declaration_only_class_or_union_type):
310 Declare new ...
311 * src/abg-ir.cc (is_declaration_only_class_or_union_type):
312 ... function.
313 (clone_array): Add the cloned array subrange to
314 its scope so that it can later be canonicalized.
315 (synthesize_type_from_translation_unit)
316 (synthesize_function_type_from_translation_unit): Canonicalize the
317 synthesized types.
318 (hash_as_canonical_type_or_constant): Ensure that all types are
319 canonicalized.
320 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Remove
321 useless overload.
322 (build_ir_node_for_variadic_parameter_type)
323 (schedule_array_tree_for_late_canonicalization): Define new static
324 functions.
325 (maybe_strip_qualification): Schedule type canonicalization for
326 types cloned prior to editing.
327 (build_function_type): Use the new
328 build_ir_node_for_variadic_parameter_type. It takes care of
329 canonicalizing variadic parameter types.
330 (build_function_decl): Canonicalize the function type that is
331 created here.
332 (build_ir_node_from_die): Use the overload of
333 maybe_canonicalize_type which canonicalizes class_or_union nodes
334 directly, rather than the one which handles DIE offsets. The
335 latter was used as an optimization to reduce the size of the array
336 of types scheduled for canonicalization, as DIE offsets take less
337 space than pointers to IR types. Now that we have DIE
338 de-duplication, my bet is that we can do away with the former.
339 And that also ensures that we miss no type for canonicalization
340 purposes.
341 * src/abg-reader.cc (build_array_type_def): Canonicalize the
342 subrange types of the array.
343 (build_type): Canonicalize all types.
344 * tests/data/test-annotate/libtest23.so.abi: Adjust.
345 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
346 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
347 * tests/data/test-annotate/test0.abi: Likewise.
348 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
349 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
350 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
351 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
352 Likewise.
353 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
354 Likewise.
355 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
356 Likewise.
357 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
358 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
359 Likewise.
360 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
361 Likewise.
362 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
363 Likewise.
364 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
365 Likewise.
366 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
367 Likewise.
368 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
369 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
370 Likewise.
371 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
372 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
373 Likewise.
374 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
375 * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
376 * tests/data/test-read-dwarf/test0.abi: Likewise.
377 * tests/data/test-read-dwarf/test0.hash.abi: Likewise.
378 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
379 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
380 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
381 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
382 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
383 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
384 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
385 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
386 Likewise.
387 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
388 Likewise.
389 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
390 Likewise.
391 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
392 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
393 Likewise.
394 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
395
3962020-11-13 Dodji Seketeli <dodji@redhat.com>
397
398 ir: Add equality op to array_type_def::subrange_type::bound_value
399 * include/abg-ir.h
400 (array_type_def::subrange_type::bound_value::operator==): Declare
401 new ...
402 * src/abg-ir.cc
403 (array_type_def::subrange_type::bound_value::operator==):
404 ... equality operator.
405
4062020-11-12 Dodji Seketeli <dodji@redhat.com>
407
408 writer: Sort decls and fix topological sorting for types
409 * include/abg-ir.h (scope_decl::get_sorted_member_decls): Declare
410 new member function.
411 * src/abg-ir.cc (struct decl_topo_comp): New sorting functor.
412 (type_topo_comp::operator()): Re-use the decl_topo_comp to sort
413 type declarations.
414 (scope_decl::priv::sorted_members_): Add new data member.
415 (scope_decl::get_sorted_member_decls): Define new member function.
416 * src/abg-writer.cc (write_translation_unit): Use the new
417 scope_decl::get_sorted_member_decls.
418 * tests/data/test-annotate/libtest23.so.abi: Adjust.
419 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
420 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
421 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
422 Likewise.
423 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
424 Likewise.
425 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
426 Likewise.
427 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
428 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
429 * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
430 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
431 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
432 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
433 Likewise.
434 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
435 Likewise.
436 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
437 Likewise.
438 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
439 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
440 Likewise.
441 * tests/data/test-read-write/test2.xml: Likewise.
442 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
443 Likewise.
444 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
445 Likewise.
446
4472020-10-27 Dodji Seketeli <dodji@redhat.com>
448
449 Bug PR26739 - Handle qualified typedef array types
450 * include/abg-fwd.h (is_typedef_of_array, clone_array)
451 (clone_typedef, clone_qualified_type, clone_array_tree): Declare
452 new functions.
453 (peel_qualified_or_typedef_type): Declare new overload.
454 (is_array_of_qualified_element): Constify the parameter.
455 * include/abg-ir.h ({qualified_type,
456 typedef}_def::set_underlying_type): Add new member functions.
457 (array_type_def::subrange_type::subrange_type): Make constify the
458 reference to the underlying type parameter.
459 * src/abg-ir.cc (is_array_of_qualified_element): Constify the
460 parameter.
461 (peel_qualified_or_typedef_type): Define new
462 overload for type_base_sptr.
463 (clone_typedef_array_qualified_type): Define static function.
464 (clone_array clone_typedef, clone_qualified_type)
465 (clone_array_tree, is_typedef_of_array): Define new functions.
466 (qualified_type_def::get_underlying_type): Rename the return type
467 shared_ptr<type_base> into type_base_sptr.
468 ({typedef, qualified_type}_def::set_underlying_type): Define new
469 member function.
470 (array_type_def::subrange_type::priv::priv): Initialize the
471 'infinite_' data member.
472 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Handle
473 qualified typedef of arrays. Merge this with the handling of
474 qualified arrays. Note that before editing the elements of the
475 array to make the array (or typedef) qualifier apply to the
476 element the sub-tree is cloned to make its type nodes be
477 'un-shared'. This prevents us from editing type nodes that are
478 shared by other type expressions.
479 * tests/data/test-diff-filter/test-PR26739-report-0.txt: New
480 reference test output.
481 * tests/data/test-diff-filter/test-PR26739-2-report-0.txt: Likewise.
482 * tests/data/test-diff-filter/test-PR26739-v{0,1}.c: Source code
483 of new binary test input.
484 * tests/data/test-diff-filter/test-PR26739-2-v{0,1}.c: Likewise.
485 * tests/data/test-diff-filter/test-PR26739-v{0,1}.o: New binary
486 test inputs.
487 * tests/data/test-diff-filter/test-PR26739-2-v{0,1}.o: Likewise.
488 * tests/data/Makefile.am: Add the new test material above to
489 source distribution.
490 * tests/test-diff-filter.cc (in_out_specs): Add the test inputs
491 above to this harness.
492 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
493 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
494 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
495 Likewise.
496 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
497 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
498 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
499 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
500 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
501 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
502 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
503 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
504
5052020-11-03 Dodji Seketeli <dodji@redhat.com>
506
507 Update test-libandroid.so.abi
508 * tests/data/test-read-dwarf/test-libandroid.so.abi: Update.
509
5102020-10-29 Matthias Maennich <maennich@google.com>
511
512 dwarf-reader: Ignore zero length location expressions from DW_AT_location
513 * src/abg-dwarf-reader.cc (die_location_expr): Ignore zero
514 length location expressions.
515 * tests/data/Makefile.am: Add new test files.
516 * tests/data/test-read-dwarf/test-libandroid.so: New test file.
517 * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
518 * tests/test-read-dwarf.cc: Add new test case.
519 Reported-by: Dan Albert <danalbert@google.com>
520 Reviewed-by: Giuliano Procida <gprocida@google.com>
521 Cc: Mark Wielaard <mark@klomp.org>
522
5232020-10-29 Giuliano Procida <gprocida@google.com>
524
525 Improve enum synthetic type names
526 * src/abg-dwarf-reader.cc
527 (build_internal_underlying_enum_type_name): Add a size
528 argument (and don't default is_anonymous argument). Append
529 size of type to synthetic type name.
530 (build_enum_underlying_type): Pass type size to
531 build_internal_underlying_enum_type_name.
532 * tests/data/test-abidiff-exit/test-decl-enum-report-3.txt:
533 Update. Note that there may be an issue with leaf-mode
534 reporting of pointer type changes.
535 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
536 Regenerate this (catching up with various abidw updates).
537 * tests/data/test-annotate/test-anonymous-members-0.o.abi:
538 Refresh with new type names.
539 * tests/data/test-annotate/test0.abi: Likewise.
540 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
541 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
542 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
543 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
544 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
545 Likewise.
546 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
547 Likewise.
548 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
549 Likewise.
550 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
551 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
552 Likewise.
553 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
554 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
555 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
556 Likewise.
557 * tests/data/test-read-dwarf/test0.abi: Likewise.
558 * tests/data/test-read-dwarf/test0.hash.abi: Likewise.
559 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
560 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
561 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
562 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
563 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
564 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
565 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
566 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
567 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
568 Likewise.
569 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
570 Likewise.
571 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
572 Likewise.
573 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
574 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
575 Likewise.
576 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
577
5782020-10-29 Giuliano Procida <gprocida@google.com>
579
580 Improve and stabilise sort of member functions
581 * src/abg-ir.cc
582 (virtual_member_function_less_than::operator()): Name
583 temporaries like offsets and symbols to reduce repetition;
584 test each pair of elements (including symbol presence) and
585 return immediately if there's a difference; add a comparison
586 of linkage name just after comparing symbol names.
587 (sort_virtual_member_functions): Use stable_sort instead of
588 sort.
589 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
590 Update with new ordering of member functions.
591 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
592 Likewise.
593
5942020-11-01 Dodji Seketeli <dodji@redhat.com>
595
596 update-test-output.py: Update syntax
597 * tests/update-test-output.py: Update syntax for python3.
598
5992020-10-31 Dodji Seketeli <dodji@redhat.com>
600
601 Bug 26770 - Spurious declaration-only-ness induces spurious type changes
602 * src/abg-dwarf-reader.cc (add_or_update_class_type): When
603 creating a class, set declaration-only-ness unconditionally. When
604 updating the class however, only set the declaration-only-ness
605 when the current one is not consistent with the size of the class.
606 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
607 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
608 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
609 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
610 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
611 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
612 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
613
6142020-10-21 Matthias Maennich <maennich@google.com>
615
616 dwarf-reader: fix lookup for repeated translation unit paths
617 * src/abg-dwarf-reader.cc(build_translation_unit_and_add_to_ir):
618 Fix lookup for potentially already existing translation units.
619 Reported-by: Dan Albert <danalbert@google.com>
620
6212020-10-21 Giuliano Procida <gprocida@google.com>
622
623 Stabilise sort of canonical types
624 * src/abg-ir.cc (scope_decl::get_sorted_canonical_types): Sort
625 canonical types with std::stable_sort(..., type_topo_comp()).
626 Reviewed-by: Matthias Maennich <maennich@google.com>
627
6282020-10-27 Mark Wielaard <mark@klomp.org>
629
630 Assume subrange bounds types are unsigned if no underlying type is given.
631 * src/abg-dwarf-reader.cc (build_subrange_type): Default
632 is_signed to false.
633
6342020-10-23 Mark Wielaard <mark@klomp.org>
635
636 dwarf-reader: get subrange_type bounds signedness from underlying type
637 * src/abg-dwarf-reader.cc (die_attribute_has_form)
638 (die_attribute_is_signed, die_attribute_is_unsigned)
639 (die_attribute_has_no_signedness): Remove static functions.
640 (die_constant_attribute): Add the 'is_signed' parameter.
641 (die_address_attribute): Adjust comment.
642 (build_subrange_type): Determine signedness of the bounds by
643 looking at the DW_AT_encoding attribute of the underlying type.
644
6452020-10-23 Dodji Seketeli <dodji@redhat.com>
646
647 abg-tools-utils: Fix comment
648 * include/abg-tools-utils.h (enum abidiff_status): Fix a comment.
649
6502020-10-13 Dodji Seketeli <dodji@redhat.com>
651
652 configure: Support ABIGAIL_NO_OPTIMIZATION_DEBUG environment variable
653 * configure.ac: Set the CXXFLAGS and CFLAGS to "-g -O0 -Wall
654 -Wextra -Werror" if the ABIGAIL_NO_OPTIMIZATION_DEBUG is set.
655
6562020-10-13 Dodji Seketeli <dodji@redhat.com>
657
658 Structurally compare the few non-canonicalized types in general
659 * include/abg-fwd.h (hash_as_canonical_type_or_constant): Remove
660 public declaration of this function.
661 * src/abg-hash.cc (type_base::dynamic_hash::operator()): Add a
662 comment.
663 * src/abg-ir.cc (hash_as_canonical_type_or_constant): Make this
664 function static now.
665 (hash_type_or_decl): Use hash_type for types.
666 * src/abg-writer.cc (type_hasher::operator()): Use hash_type.
667
6682020-10-12 Dodji Seketeli <dodji@redhat.com>
669
670 Fix redundancy detection in the diff graph
671 * src/abg-comparison-priv.h
672 (diff_context::priv::last_visited_diff_node_): Remove unnecessary
673 data member.
674 (class_or_union_diff::priv::sorted_{deleted,inserted}_member_functions_):
675 Add new data members.
676 (sort_string_member_function_sptr_map): Declare new function.
677 * src/abg-comparison.cc (sort_string_member_function_sptr_map):
678 Define new function.
679 (redundancy_marking_visitor::visit_begin): If the current diff
680 node is equivalent to another one that has been already marked
681 redundant, then consider the current diff node as redundant as
682 well. Considering the fact an ancestor node has been filtered out
683 is now useless because if that's the case then the current
684 descendant node wouldn't even be walked at reporting time. So
685 remove the call to diff_has_ancestor_filtered_out.
686 (categorize_redundancy): Remove useless call here as well.
687 (diff_has_ancestor_filtered_out, diff_has_ancestor_filtered_out)
688 (diff_context::{mark_last_diff_visited_per_class_of_equivalence,
689 clear_last_diffs_visited_per_class_of_equivalence,
690 get_last_visited_diff_of_class_of_equivalence}): Remove
691 unnecessary functions.
692 (redundancy_marking_visitor::visit_end): Add comment.
693 (class_diff::ensure_lookup_tables_populated): Lexicographically
694 sort inserted/deleted member functions.
695 (class_or_union_diff::chain_into_hierarchy): Chain changed data
696 members diff nodes in a sorted manner.
697 * src/abg-default-reporter.cc (default_reporter::report): Report
698 deleted/inserted member functions in lexicographic order.
699 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
700 Adjust.
701 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
702 Likewise.
703 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
704 Likewise.
705 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
706 Likewise.
707 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
708 Likewise.
709
7102020-10-08 Dodji Seketeli <dodji@redhat.com>
711
712 Consider the implicit 'this' parameter when comparing methods
713 * include/abg-ir.h (function_type::get_first_parm): Declare new
714 accessor.
715 * src/abg-ir.cc (function_type::get_first_parm): Define new
716 accessor.
717 (equals): In the overload for function_type,
718 always take the implicit "this" parameter into account in
719 parameter comparisons.
720 (function_type::get_first_non_implicit_parm): Adjust comment.
721 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
722 Avoid potential NULL pointer dereferencing.
723 * src/abg-comparison.cc
724 (function_type_diff::ensure_lookup_tables_populated): Always take
725 the changes to the implicit 'this' parameter into account in the
726 function type diff.
727 (compute_diff): In the overload for function_type, Always compare
728 the implicit 'this' parameter when comparing function parameters.
729 * src/abg-default-reporter.cc (default_reporter::report): Refer to
730 "implicit parameter" when reporting changes on parameters
731 artificially generated by the compiler.
732 * src/abg-suppression.cc (type_suppression::suppresses_diff): Make
733 the 'access_through' predicate work on a qualified version of type
734 'S', even if it was meant to work on type 'S'. This allows it to
735 work on 'const S', especially when S is accessed through 'pointer
736 to const S', which happens when we consider the implicit 'this'
737 parameter of a const member function.
738 * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust.
739 * tests/data/test-abicompat/test5-fn-changed-report-1.txt: Likewise.
740 * tests/data/test-abidiff-exit/test1-voffset-change-report0.txt:
741 Likewise.
742 * tests/data/test-abidiff/test-PR18791-report0.txt: Likewise.
743 * tests/data/test-abidiff/test-struct1-report.txt: Likewise.
744 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt:
745 Likewise.
746 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
747 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Likewise.
748 * tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt: Likewise.
749 * tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt: Likewise.
750 * tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt: Likewise.
751 * tests/data/test-diff-dwarf/test36-ppc64-aliases-report-0.txt: Likewise.
752 * tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt: Likewise.
753 * tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt: Likewise.
754 * tests/data/test-diff-dwarf/test5-report.txt: Likewise.
755 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
756 * tests/data/test-diff-filter/test0-report.txt: Likewise.
757 * tests/data/test-diff-filter/test01-report.txt: Likewise.
758 * tests/data/test-diff-filter/test10-report.txt: Likewise.
759 * tests/data/test-diff-filter/test13-report.txt: Likewise.
760 * tests/data/test-diff-filter/test2-report.txt: Likewise.
761 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt:
762 Likewise.
763 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt:
764 Likewise.
765 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
766 Likewise.
767 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
768 Likewise.
769 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
770 Likewise.
771 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
772 Likewise.
773 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
774 Likewise.
775 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
776 Likewise.
777 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt:
778 Likewise.
779 * tests/data/test-diff-filter/test4-report.txt: Likewise.
780 * tests/data/test-diff-filter/test41-report-0.txt: Likewise.
781 * tests/data/test-diff-filter/test9-report.txt: Likewise.
782 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt:
783 Likewise.
784 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
785 Likewise.
786 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
787 Likewise.
788 * tests/data/test-diff-suppr/test24-soname-report-0.txt: Likewise.
789 * tests/data/test-diff-suppr/test24-soname-report-1.txt: Likewise.
790 * tests/data/test-diff-suppr/test24-soname-report-10.txt: Likewise.
791 * tests/data/test-diff-suppr/test24-soname-report-11.txt: Likewise.
792 * tests/data/test-diff-suppr/test24-soname-report-12.txt: Likewise.
793 * tests/data/test-diff-suppr/test24-soname-report-13.txt: Likewise.
794 * tests/data/test-diff-suppr/test24-soname-report-14.txt: Likewise.
795 * tests/data/test-diff-suppr/test24-soname-report-15.txt: Likewise.
796 * tests/data/test-diff-suppr/test24-soname-report-16.txt: Likewise.
797 * tests/data/test-diff-suppr/test24-soname-report-2.txt: Likewise.
798 * tests/data/test-diff-suppr/test24-soname-report-3.txt: Likewise.
799 * tests/data/test-diff-suppr/test24-soname-report-4.txt: Likewise.
800 * tests/data/test-diff-suppr/test24-soname-report-5.txt: Likewise.
801 * tests/data/test-diff-suppr/test24-soname-report-6.txt: Likewise.
802 * tests/data/test-diff-suppr/test24-soname-report-7.txt: Likewise.
803 * tests/data/test-diff-suppr/test24-soname-report-8.txt: Likewise.
804 * tests/data/test-diff-suppr/test24-soname-report-9.txt: Likewise.
805 * tests/data/test-diff-suppr/test31-report-1.txt: Likewise.
806 * tests/data/test-diff-suppr/test33-report-0.txt: Likewise.
807
8082020-08-17 Giuliano Procida <gprocida@google.com>
809
810 Fix two wrongs in test suppression regex
811 * tests/data/test-diff-suppr/test38-char-class-in-ini.abignore:
812 Don't anchor regex match to beginning of file name.
813 Change "filename_regexp" to "file_name_regexp".
814
8152020-08-17 Giuliano Procida <gprocida@google.com>
816
817 Add missing newlines to end of test files.
818 * tests/data/test-diff-suppr/test0-type-suppr-2.suppr: Add
819 final new line.
820 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-4.suppr:
821 Likewise.
822 * tests/data/test-diff-suppr/test23-alias-filter-0.suppr:
823 Likewise.
824 * tests/data/test-diff-suppr/test23-alias-filter-4.suppr:
825 Likewise.
826 * tests/data/test-diff-suppr/test28-add-aliased-function-1.suppr:
827 Likewise.
828 * tests/data/test-diff-suppr/test28-add-aliased-function-2.suppr:
829 Likewise.
830 * tests/data/test-diff-suppr/test28-add-aliased-function-3.suppr:
831 Likewise.
832 * tests/data/test-diff-suppr/test28-add-aliased-function-4.suppr:
833 Likewise.
834 * tests/data/test-diff-suppr/test41-enumerator-changes-0.suppr:
835 Likewise.
836 * tests/data/test-diff-suppr/test7-var-suppr-7.suppr:
837 Likewise.
838 * tests/data/test-ini/test01-equal-in-property-string.abignore:
839 Likewise.
840
8412020-09-18 Giuliano Procida <gprocida@google.com>
842
843 abg-corpus.cc: report architecture discrepancies
844 * src/abg-corpus.cc (corpus_group::add_corpus): Report
845 architecture discrepancies.
846
8472020-09-16 Dodji Seketeli <dodji@redhat.com>
848
849 Bug 26568 - Union should support more than one anonymous member
850 * src/abg-dwarf-reader.cc (add_or_update_union_type): Don't use
851 the empty name of anonymous members in the lookup to ensure that
852 all data members are unique. Rather, use the whole anonymous
853 member itself for the lookup, just like is done to handle
854 anonymous data member in classes/structs.
855 * src/abg-reader.cc (build_union_decl): Likewise.
856 * src/abg-ir.cc (get_generic_anonymous_internal_type_name): Define
857 new static function.
858 (get_type_name): For internal purposes, make the type name of all
859 anonymous types of a given kind to be the same. This allows the
860 internal representation of anonymous types which are based on type
861 names to all be the same, so that they can be compared among
862 themselves during type canonicalization.
863 * tests/data/test-read-dwarf/test-PR26568-{1,2}.c: Source code of
864 binary test input.
865 * tests/data/test-read-dwarf/test-PR26568-{1,2}.o: New binary test input.
866 * tests/data/test-read-dwarf/test-PR26568-{1,2}.o.abi: New
867 reference test ouput.
868 * tests/data/Makefile.am: Add the new test material above to
869 source distribution.
870 * tests/test-read-dwarf.cc (in_out_specs): Add the new binary test
871 input above to this test harness.
872 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi: Adjust.
873 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
874 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
875
8762020-09-02 Dodji Seketeli <dodji@redhat.com>
877
878 Make abidiff and abidw support several --headers-dir{1,2} options
879 * doc/manuals/abidiff.rst: Update documentation for the
880 --headers-dir{1,2} options.
881 * doc/manuals/abidw.rst: Likewise for the --header-dir option.
882 * include/abg-tools-utils.h (gen_suppr_spec_from_headers): Add new
883 overload that takes a vector of headers root dirs.
884 * src/abg-tools-utils.cc (gen_suppr_spec_from_headers_root_dir):
885 Define new function.
886 (gen_suppr_spec_from_headers): Define a new overload that takes a
887 vector of head_root_dir strings; it uses the new
888 gen_suppr_spec_from_headers function. Use the new overload in the
889 previous one that takes just one head_root_dir string.
890 * tools/abidiff.cc (options::headers_dirs{1,2}): Rename
891 option::headers_dir{1,2} into this one and make it be a vector of
892 strings rather than just a string.
893 (parse_command_line): Support several --headers-dir{1,2} on the
894 command line.
895 (set_diff_context_from_opts, set_suppressions): Adjust.
896 * tools/abidw.cc (options::headers_dirs): Renamed
897 options::headers_dir into this and make it be a vector of strings
898 rather than just a string.
899 (parse_command_line): Support several --headers-dir on the command
900 line.
901 (set_suppressions): Adjust.
902 * tests/data/test-abidiff-exit/test-headers-dirs/headers-a/header-a-v{0,1}.h:
903 Header files of new binary test input.
904 * tests/data/test-abidiff-exit/test-headers-dirs/headers-b/header-b-v{0,1}.h:
905 Likewise.
906 * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-v{0,1}.c:
907 Source code of new binary test input.
908 * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-{1,2}.txt:
909 Reference output of new binary test input.
910 * tests/data/test-abidiff-exit/test-headers-dirs/test-headers-dir-v{0,1}.o:
911 New binary test input.
912 * tests/data/Makefile.am: Add the new files above to source
913 distribution.
914 * tests/test-abidiff-exit.cc (InOutSpec::in_elfv{0,1}_path): Add
915 new data members.
916 (in_out_specs): Adjust the content of this array as its type
917 changed. Also, add two new entries to run the test over the new
918 binary test inputs above.
919 (do_prefix_strings): Define new static function.
920 (main): Use it the new do_prefix_strings here. Make abidiff
921 use the --header-dir{1,2} option whenever header directories are
922 specified in an entry of the in_out_specs array.
923
9242020-09-14 Dodji Seketeli <dodji@redhat.com>
925
926 Bug 26309 - Wrong leaf reporting of changes to typedef underlying type
927 * src/abg-ir.cc (equals): In the overload for typedef_decls,
928 report changes to the underlying type as being local of kind
929 LOCAL_TYPE_CHANGE_KIND.
930 * src/abg-comparison.cc
931 (leaf_diff_node_marker_visitor::visit_begin): Do not mark typedef
932 diff node as leaf node.
933 (suppression_categorization_visitor::visit_end): Propagate the
934 'suppressed' category of the underlying type to the parent typedef
935 unless the later has a local non-type change.
936 (redundancy_marking_visitor::visit_end): Likewise for the
937 'redundant' category.
938 * include/abg-reporter.h (report_non_type_typedef_changes): Rename ...
939 * src/abg-default-reporter.cc (report_non_type_typedef_changes):
940 ... report_local_typedef_changes into this.
941 * src/abg-leaf-reporter.cc (leaf_reporter::report): Make the leaf
942 reporter invoke the reporting method of the default reporter for
943 typedefs as all typedef changes are now local.
944 * tests/data/test-diff-filter/test-PR26309-report-0.txt: Add new
945 test reference output.
946 * tests/data/test-diff-filter/test-PR26309-v{0,1}.o: Add new test
947 binary input.
948 * tests/data/test-diff-filter/test-PR26309-v{0,1}.c: Add source
949 code for new test binary input.
950 * tests/data/Makefile.am: Add the new text material above to
951 source distribution.
952 * tests/test-diff-filter.cc (in_out_specs): Add the new test input
953 above to this test harness.
954 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt: Adjust.
955
9562020-09-14 Dodji Seketeli <dodji@redhat.com>
957
958 Fix thinko in get_vmlinux_path_from_kernel_dist
959 * src/abg-tools-utils.cc (get_vmlinux_path_from_kernel_dist): Fix
960 thinko.
961
9622020-09-08 Dodji Seketeli <dodji@redhat.com>
963
964 writer: Avoid using dynamic hashing in type maps
965 * include/abg-fwd.h (hash_as_canonical_type_or_constant): Declare ...
966 * src/abg-ir.cc (hash_as_canonical_type_or_constant): ... new
967 function.
968 * src/abg-writer.cc (type_hasher::operator()): Use the new
969 hash_as_canonical_type_or_constant.
970 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
971
9722020-09-08 Dodji Seketeli <dodji@redhat.com>
973
974 Use flat representation to canonicalize anonymous classes and unions
975 * src/abg-ir.cc ({class, union}_decl::get_pretty_representation):
976 Use the flat representation of the class or union even for
977 internal purposes.
978 * tests/data/test-annotate/libtest23.so.abi: Adjust.
979 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt: Likewise.
980 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
981 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
982 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
983 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
984 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
985 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
986 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
987 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
988
9892020-07-24 Giuliano Procida <gprocida@google.com>
990
991 DWARF: track chained DIE declaration-only status
992 * src/abg-dwarf-reader.cc (add_or_update_class_type): Add an
993 is_declaration_only argument. Use this in favour of the
994 die_is_declaration_only helper function.
995 (add_or_update_union_type): Ditto.
996 (function_is_suppressed): Ditto.
997 (build_or_get_fn_decl_if_not_suppressed): Ditto.
998 (build_enum_type): Ditto.
999 (build_ir_node_from_die): To the main overload, add
1000 is_declaration_only argument and default this to true.
1001 Update this to false if the given DIE is not declaration
1002 only and pass this on in recusrive calls and calls to
1003 build_enum_type, add_or_update_union_type,
1004 add_or_update_class_type and
1005 build_or_get_fn_decl_if_not_suppressed.
1006 * tests/data/test-annotate/test17-pr19027.so.abi: Update
1007 test. This is mostly the removal of is-declaration-only
1008 attributes, removal of unreachable parts of the type graph and
1009 type id renumbering.
1010 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1011 Likewise.
1012 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1013 Likewise.
1014 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1015 Likewise.
1016 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt:
1017 Likewise.
1018 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
1019 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1020 Likewise.
1021 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1022 Likewise.
1023 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1024 Likewise.
1025
10262020-07-24 Giuliano Procida <gprocida@google.com>
1027
1028 DWARF: look up DW_AT_declaration non-recursively
1029 * src/abg-dwarf-reader.cc (die_die_attribute): Rename
1030 'look_thru_abstract_origin' argument to 'recursively' and
1031 mention DW_AT_specification in its doc comment. Remove stale
1032 comment for non-existent argument. Simplify code with the help
1033 of the ternary operator. (die_flag_attribute): Add
1034 recursively argument, defaulted to true. If this is false,
1035 look for attribute using dwarf_attr rather than
1036 dwarf_attr_integrate. (die_is_declaration_only): Call
1037 die_flag_attribute specifying non-recursive attribute search.
1038 * tests/data/test-annotate/test15-pr18892.so.abi: Update
1039 tests. This is mostly the removal of unreachable parts of the type
1040 graph and type id renumbering.
1041 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1042 Likewise.
1043 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1044 Likewise.
1045 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt:
1046 Likewise.
1047 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
1048 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1049 Likewise.
1050 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1051 Likewise.
1052 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
1053 Likewise.
1054
10552020-07-24 Giuliano Procida <gprocida@google.com>
1056
1057 Improve documentation of abidiff --type-id-style
1058 * tools/abidw.cc (display_usage): In documentation of
1059 "--type-id-style" option, add a missing closing ')', spell
1060 "type id" without a '-', split overly long string over two
1061 lines, use "<...>" to indicate mandatory argument and improve
1062 description of formats.
1063 * doc/manuals/abidw.rst: In documentation of "--type-id-style"
1064 option, use "<...>" to indicate mandatory argument.
1065
10662020-07-23 Giuliano Procida <gprocida@google.com>
1067
1068 Fix maybe_report_data_members_replaced_by_anon_dm
1069 * src/abg-reporter-priv.cc
1070 (maybe_report_data_members_replaced_by_anon_dm): Move
1071 declarations of anonymous_data_member and
1072 dms_replaced_by_same_anon_dm into inner loop. Use
1073 anonymous_data_member for testing and reporting, allowing
1074 iterators i and j to be replaced by just iterator i. Push
1075 first decl onto dms_replaced_by_same_anon_dm unconditionally
1076 and move control flow logic into loop condition.
1077 * tests/data/Makefile.am: Add new test cases.
1078 * tests/data/test-diff-filter/test-PR25661-7-report-1.txt: New
1079 test case file.
1080 * tests/data/test-diff-filter/test-PR25661-7-report-2.txt:
1081 Likewise.
1082 * tests/data/test-diff-filter/test-PR25661-7-report-3.txt:
1083 Likewise.
1084 * tests/data/test-diff-filter/test-PR25661-7-report-4.txt:
1085 Likewise.
1086 * tests/data/test-diff-filter/test-PR25661-7-v0.c: Likewise.
1087 * tests/data/test-diff-filter/test-PR25661-7-v0.o: Likewise.
1088 * tests/data/test-diff-filter/test-PR25661-7-v1.c: Likewise.
1089 * tests/data/test-diff-filter/test-PR25661-7-v1.o: Likewise.
1090 * tests/test-diff-filter.cc: Call new test cases.
1091
10922020-07-22 Giuliano Procida <gprocida@google.com>
1093
1094 Fix decl_base comparison function
1095 * src/abg-ir.cc (equals): In the decl_base overload, note that
1096 the value returned by decl_names_equal should be negated and
1097 replace decls_are_different with decls_are_same, negating all
1098 occurrences.
1099 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
1100 Update tests, removing some spurious anonymous union name change.
1101 * tests/data/test-diff-filter/test33-report-0.txt: Diff now
1102 completely empty.
1103 * tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt:
1104 3 functions previously considered to have harmless changes are
1105 now deemed to have no changes.
1106 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
1107 1 struct RedStore data member previously considered to have
1108 harmless changes is now deemed to have no changes.
1109 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi:
1110 One instance of an anonymous struct removed and a typedef
1111 repointed at another existing instance; many type ids
1112 renumbered.
1113
11142020-07-22 Giuliano Procida <gprocida@google.com>
1115
1116 Make decl_names_equal more accurate
1117 * src/abg-tools-utils.cc (decl_names_equal): Move {l,r}_pos2
1118 declarations into the loop and make {l,r}_length const. Avoid
1119 chance of arithmetic on string::npos values. Rework
1120 logic so there is a single test for "names compare equal" and
1121 a single test for different numbers of name components.
1122 * tests/test-tools-utils.cc (main): Add nine more tests.
1123
11242020-07-30 Dodji Seketeli <dodji@redhat.com>
1125
1126 Bug 26261 - Fix logic for canonicalizing DW_TAG_subroutine_type DIEs
1127 * src/abg-dwarf-reader.cc (compare_dies): Get out early if we are
1128 are in the middle of a potential recursive comparison of function
1129 types. Likewise if we detect that the two function types have
1130 different textual representations, linkage names, or have a the
1131 same textual representation, linkage names and are defined in the
1132 same translation unit.
1133 * tests/data/test-read-dwarf/PR26261/PR26261-exe: New test binary
1134 input file.
1135 * tests/data/test-read-dwarf/PR26261/PR26261-exe.abi: New
1136 reference test output file.
1137 * tests/data/test-read-dwarf/PR26261/PR26261-main.c: Source code
1138 of the binary above.
1139 * tests/data/test-read-dwarf/PR26261/PR26261-obj{a,b}.{c,h}:
1140 Likewise.
1141 * tests/data/test-read-dwarf/PR26261/Makefile: Makefile to
1142 build the exe out of the source files.
1143 * tests/data/Makefile.am: Add the new test input files to source
1144 distribution.
1145 * tests/test-read-dwarf.cc (in_out_spec): Add the binary test
1146 input above to the test harness.
1147
11482020-07-29 Dodji Seketeli <dodji@redhat.com>
1149
1150 dwarf-reader: re-indent a block of code
1151 * src/abg-dwarf-reader.cc (compare_dies): Properly indent a
1152 sub-block of the big switch case statement in there.
1153
11542020-07-17 Giuliano Procida <gprocida@google.com>
1155
1156 abg-ir.cc: Remove duplicated line of code
1157 * src/abg-ir.cc (decl_base::set_definition_of_declaration):
1158 Remove duplicated assignment statement.
1159
11602020-07-16 Giuliano Procida <gprocida@google.com>
1161
1162 abg-writer.cc: Fix indentation of XML output
1163 * src/abg-writer.cc (write_canonical_types_of_scope): Do not
1164 add additional indentation. (write_translation_unit): Pass
1165 additional indentation to write_canonical_types_of_scope.
1166 (write_class_decl): Ensure optional annotations of base
1167 classes have the same indentation as the base classes
1168 themselves.
1169 * tests/data/test-annotate/libtest23.so.abi: Fix indentation.
1170 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Ditto.
1171 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Ditto.
1172 * tests/data/test-annotate/test-anonymous-members-0.o.abi:
1173 Ditto.
1174 * tests/data/test-annotate/test1.abi: Ditto.
1175 * tests/data/test-annotate/test14-pr18893.so.abi: Ditto.
1176 * tests/data/test-annotate/test15-pr18892.so.abi: Ditto.
1177 * tests/data/test-annotate/test17-pr19027.so.abi: Ditto.
1178 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1179 Ditto.
1180 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1181 Ditto.
1182 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1183 Ditto.
1184 * tests/data/test-annotate/test21-pr19092.so.abi: Ditto.
1185 * tests/data/test-diff-suppr/test45-abi-wl.xml: Ditto.
1186 * tests/data/test-diff-suppr/test45-abi.xml: Ditto.
1187 * tests/data/test-diff-suppr/test46-PR25128-base.xml: Ditto.
1188 * tests/data/test-diff-suppr/test46-PR25128-new.xml: Ditto.
1189 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
1190 Ditto.
1191 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Ditto.
1192 * tests/data/test-read-dwarf/libtest23.so.abi: Ditto.
1193 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
1194 Ditto.
1195 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Ditto.
1196 * tests/data/test-read-dwarf/test1.abi: Ditto.
1197 * tests/data/test-read-dwarf/test1.hash.abi: Ditto.
1198 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Ditto.
1199 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Ditto.
1200 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Ditto.
1201 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Ditto.
1202 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Ditto.
1203 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Ditto.
1204 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Ditto.
1205 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1206 Ditto.
1207 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1208 Ditto.
1209 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1210 Ditto.
1211 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Ditto.
1212 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
1213 Ditto.
1214 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Ditto.
1215 * tests/data/test-read-write/test10.xml: Ditto.
1216 * tests/data/test-read-write/test15.xml: Ditto.
1217 * tests/data/test-read-write/test21.xml: Ditto.
1218 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
1219 Ditto.
1220 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
1221 Ditto.
1222
12232020-07-16 Giuliano Procida <gprocida@google.com>
1224
1225 Remove ABI XML test data file blank lines
1226 * tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Remove
1227 blank lines.
1228 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
1229 Ditto.
1230 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
1231 Ditto.
1232 * tests/data/test-diff-suppr/test45-abi-wl.xml: Ditto.
1233 * tests/data/test-diff-suppr/test45-abi.xml: Ditto.
1234 * tests/data/test-diff-suppr/test46-PR25128-base.xml: Ditto.
1235 * tests/data/test-diff-suppr/test46-PR25128-new.xml: Ditto.
1236
12372020-07-15 Giuliano Procida <gprocida@google.com>
1238
1239 abg-ir.cc: Fix incorrect pop of compared types.
1240 * src/abg-ir.cc (equals): In the class_or_union overload,
1241 replace one instance of RETURN(false) with return false.
1242
12432020-07-09 Giuliano Procida <gprocida@google.com>
1244
1245 Enable Clang's -Werror-overloaded-virtual.
1246 * configure.ac: Remove the special clause that disabled
1247 -Werror-overloaded-virtual for Clang builds.
1248
12492020-07-09 Giuliano Procida <gprocida@google.com>
1250
1251 Fix inheritance of scope_decl::insert_member_decl
1252 * include/abg-ir.h (scope_decl::insert_member_decl): Change
1253 type of member argument from const decl_base_sptr& to plain
1254 decl_base_sptr.
1255 * src/abg-ir.cc (scope_decl::insert_member_decl): Likewise.
1256
12572020-07-27 Dodji Seketeli <dodji@redhat.com>
1258
1259 Pimpl-ify traversable_base and remove its unused traverse method
1260 * include/abg-traverse.h (traversable_base::priv): Declare new type.
1261 (traverse_base::priv_sptr): Add pointer to private data
1262 member.
1263 (traverse_base::visiting_): Move this data member definition into
1264 traverse_base::priv.
1265 (traverse_base::{visiting, traverse_base, ~traverse_base}): Move
1266 definitions out-of-oline.
1267 (traverse_base::traverse): Comment out.
1268 * src/abg-traverse.cc (struct traversable_base::priv): Define new
1269 type.
1270 (traversable_base::{traversable_base, ~traversable_base, traverse,
1271 visiting}): Move these previous inline definitions here.
1272
12732020-07-09 Giuliano Procida <gprocida@google.com>
1274
1275 Simplify peel_typedef_pointer_or_reference_type
1276 * include/abg-fwd.h (peel_qualified_or_typedef_type): Remove
1277 second argument in declarations of both overloads.
1278 * src/abg-comp-filter.cc (is_mostly_distinct_diff): Remove
1279 second argument to peel_qualified_or_typedef_type.
1280 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Likewise.
1281 * src/abg-ir.cc (peel_qualified_or_typedef_type): In both
1282 overloads, remove second argument peel_qual_type, simplify
1283 code with the assumption it was always false and remove
1284 incomplete array type peeling logic. In type_base_sptr
1285 overload, remove stray space.
1286
12872020-07-09 Giuliano Procida <gprocida@google.com>
1288
1289 Remove unused is_reference_or_pointer_diff.
1290 * include/abg-comparison.h (is_reference_or_pointer_diff):
1291 Drop function declaration.
1292 * src/abg-comparison.cc (is_reference_or_pointer_diff): Drop
1293 function definition.
1294
12952020-07-09 Giuliano Procida <gprocida@google.com>
1296
1297 abg-comparison.h: Remove stray declaration
1298 * include/abg-comparison
1299 (is_reference_or_pointer_diff_to_non_basic_distinct_types):
1300 Remove stray declaration.
1301
13022020-07-08 Giuliano Procida <gprocida@google.com>
1303
1304 abg-ir.cc: Refactor operator== methods with helper function
1305 * src/abg-ir.cc (try_canonical_compare): New template function.
1306 (type_decl::operator==): Use it here.
1307 (scope_type_decl::operator==): Likewise.
1308 (qualified_type_def::operator==): Likewise.
1309 (pointer_type_def::operator==): Likewise.
1310 (reference_type_def::operator==): Likewise.
1311 (array_type_def::subrange_type::operator==): Likewise.
1312 (array_type_def::operator==): Likewise.
1313 (enum_type_decl::operator==): Likewise.
1314 (typedef_decl::operator==): Likewise.
1315 (function_type::operator==): Likewise.
1316 (class_or_union::operator==): Likewise.
1317 (class_decl::operator==): Likewise.
1318 (union_decl::operator==): Likewise.
1319
13202020-07-01 Giuliano Procida <gprocida@google.com>
1321
1322 abg-comparison.cc: Tidy some corpus_diff code
1323 * src/abg-comparison.cc (corpus_diff::priv::emit_diff_stats):
1324 Adjust code whitespace; rename the second instance of
1325 total_nb_variable_changes to
1326 total_nb_unreachable_type_changes.
1327 (corpus_diff::has_incompatible_changes): Fix comment typo.
1328
13292020-07-06 Giuliano Procida <gprocida@google.com>
1330
1331 Fix --type-id-style hash for empty internal names.
1332 * src/abg-writer.cc (write_context::get_id_for_type): When
1333 hashing internal type names, convert to std::string rather
1334 than using the raw method directly as this will avoid a null
1335 pointer dereference in the case of an empty string; tabify
1336 code indentation.
1337
13382020-07-08 Giuliano Procida <gprocida@google.com>
1339
1340 abg-ir.cc: Tidy some operator== definitions
1341 * src/abg-irc.cc (scope_type_decl::operator==): Compare naked
1342 canonical type pointers instead of the shared pointers.
1343 (qualified_type_def::operator==): Remove excess blank line.
1344 (function_type::operator==): Do dynamic_cast and check of
1345 argument before comparing naked canonical type pointers.
1346 (class_or_union::operator==): Eliminate temporary reference.
1347 (class_decl::operator==): Likewise.
1348 (union_decl::operator==): Likewise.
1349
13502020-07-17 Giuliano Procida <gprocida@google.com>
1351
1352 Fix corpus_diff::has_net_changes for --leaf-changes-only mode
1353 * include/abg-reporter.h ({reporter_base, default_reporter,
1354 leaf_reporter}::diff_has_net_changes): Add new virtual function.
1355 This breaks binary compatibility but should conserve source
1356 compatibility.
1357 * src/abg-default-reporter.cc
1358 (default_reporter::diff_has_net_changes): Define new member
1359 function.
1360 * src/abg-leaf-reporter.cc (leaf_reporter::diff_has_net_changes):
1361 Likewise.
1362 * src/abg-comparison.cc (corpus_diff::has_net_changes): Invoke
1363 reporter_base::diff_has_net_changes on the current reporter,
1364 rather than trying to handle all the different kinds of reporters
1365 here.
1366 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Add a
1367 TODO to possibly delegate the implementation of this function to
1368 the reporters.
1369 * tests/data/Makefile.am: Add new test case files.
1370 * tests/data/test-abidiff-exit/test-net-change-report0.txt:
1371 Normal mode, nothing suppressed.
1372 * tests/data/test-abidiff-exit/test-net-change-report1.txt:
1373 Normal mode, everything suppressed.
1374 * tests/data/test-abidiff-exit/test-net-change-report2.txt:
1375 Leaf mode, nothing suppressed.
1376 * tests/data/test-abidiff-exit/test-net-change-report3.txt:
1377 Leaf mode, everything suppressions.
1378 * tests/data/test-abidiff-exit/test-net-change-v0.c: Test file
1379 * tests/data/test-abidiff-exit/test-net-change-v0.o: Test file
1380 * tests/data/test-abidiff-exit/test-net-change-v1.c: Test file
1381 * tests/data/test-abidiff-exit/test-net-change-v1.o: Test file
1382 * tests/data/test-abidiff-exit/test-net-change.abignore: This
1383 suppresses changes for all variables, functions and types in
1384 the test files, except for the 'victim' function.
1385 * tests/test-abidiff-exit.cc: Run new test cases.
1386 Reviewed-by: Matthias Maennich <maennich@google.com>
1387
13882020-07-01 Giuliano Procida <gprocida@google.com>
1389
1390 reporter: Fix report whitespace typos.
1391 * src/abg-reporter-priv.cc (represent): Add missing space to
1392 string split across two lines in certain anonymous data member
1393 diffs.
1394 * src/abg-default-reporter.cc (report): In the array_diff
1395 overload, eliminate trailing space at end of line.
1396 * tests/data/test-diff-dwarf/test10-report.txt: Delete
1397 trailing whitespace.
1398 * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
1399 Ditto.
1400 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
1401 Ditto.
1402 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt:
1403 Ditto.
1404 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
1405 Ditto.
1406 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
1407 Ditto.
1408
14092020-07-09 Giuliano Procida <gprocida@google.com>
1410
1411 abg-writer.cc: Clean up new line emission.
1412 * src/abg-writer.cc (annotate): In the
1413 function_decl::parameter_sptr overload, fix code whitespace.
1414 (write_decl_in_scope): Remove wrote_context state variable and
1415 associated logic; emit new line unconditionally after end of
1416 XML tags and nowhere else.
1417 (write_canonical_types_of_scope): Emit new line after end of
1418 XML comment and nowhere else.
1419 (write_translation_unit): Emit new line after end of XML tags
1420 and nowhere else.
1421 (write_type_decl): Likewise.
1422 (write_namespace_decl): Likewise.
1423 (write_qualified_type_def): Emit new line after end of XML tag.
1424 (write_pointer_type_def): Likewise.
1425 (write_reference_type_def): Likewise.
1426 (write_array_type_def): Emit new line after end of XML tags
1427 and nowhere else.
1428 (write_enum_type_decl): Emit new line after end of XML tag.
1429 (write_elf_symbol): Likewise.
1430 (write_elf_symbols_table): Emit no new lines.
1431 (write_elf_needed): Emit new line unconditionally after end of
1432 XML tags.
1433 (write_typedef_decl): Emit new line after end of XML tag.
1434 (write_var_decl): Emit new line after end of XML tag.
1435 (write_function_decl): Likewise.
1436 (write_function_type): Fold two output statements into
1437 one; emit new line after end of XML tag.
1438 (write_class_decl_opening_tag): Emit new line unconditionally
1439 after end of XML tags and simplify empty element tag logic.
1440 (write_union_decl_opening_tag): Likewise.
1441 (write_class_decl): Emit new line after end of XML tag and
1442 nowhere else.
1443 (write_union_decl): Likewise.
1444 (write_member_type_opening_tag): Emit new line after end of
1445 XML tag.
1446 (write_member_type): Emit new lines only after XML tags.
1447 (write_type_tparameter): Emit new line after XML tag.
1448 (write_non_type_tparameter): Likewise.
1449 (write_template_tparameter): Emit new line after XML tag and
1450 nowhere else.
1451 (write_type_composition): Likewise.
1452 (write_template_parameters): Emit no new lines.
1453 (write_function_tdecl): Emit new line after XML tag and
1454 nowhere else.
1455 (write_class_tdecl): Likewise.
1456 (write_corpus): Emit new lines only after XML tags.
1457 (dump): In the decl_base_sptr overload, don't emit final new
1458 line as this is now done by write_decl. In the var_decl_sptr
1459 overload, don't emit final new line (mistakenly done to cerr
1460 instead of o) as this is now done by write_var_decl. In the
1461 translation_unit overload, don't emit final new line as this
1462 doubles that emitted by write_translation_unit.
1463 * tests/data/test-annotate/libtest23.so.abi: Delete all blank
1464 lines.
1465 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Ditto.
1466 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Ditto.
1467 * tests/data/test-annotate/test-anonymous-members-0.o.abi:
1468 Ditto.
1469 * tests/data/test-annotate/test1.abi: Ditto.
1470 * tests/data/test-annotate/test13-pr18894.so.abi: Ditto.
1471 * tests/data/test-annotate/test14-pr18893.so.abi: Ditto.
1472 * tests/data/test-annotate/test15-pr18892.so.abi: Ditto.
1473 * tests/data/test-annotate/test17-pr19027.so.abi: Ditto.
1474 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1475 Ditto.
1476 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1477 Ditto.
1478 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1479 Ditto.
1480 * tests/data/test-annotate/test21-pr19092.so.abi: Ditto.
1481 * tests/data/test-annotate/test7.so.abi: Ditto.
1482 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
1483 Ditto.
1484 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Ditto.
1485 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Ditto.
1486 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
1487 Ditto.
1488 * tests/data/test-read-dwarf/libtest23.so.abi: Ditto.
1489 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
1490 Ditto.
1491 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Ditto.
1492 * tests/data/test-read-dwarf/test1.abi: Ditto.
1493 * tests/data/test-read-dwarf/test1.hash.abi: Ditto.
1494 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Ditto.
1495 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Ditto.
1496 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Ditto.
1497 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Ditto.
1498 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Ditto.
1499 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Ditto.
1500 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Ditto.
1501 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Ditto.
1502 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1503 Ditto.
1504 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1505 Ditto.
1506 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1507 Ditto.
1508 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Ditto.
1509 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
1510 Ditto.
1511 * tests/data/test-read-dwarf/test7.so.abi: Ditto.
1512 * tests/data/test-read-dwarf/test7.so.hash.abi: Ditto.
1513 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi:
1514 Ditto.
1515 * tests/data/test-read-write/test10.xml: Ditto.
1516 * tests/data/test-read-write/test15.xml: Ditto.
1517 * tests/data/test-read-write/test21.xml: Ditto.
1518 * tests/data/test-read-write/test25.xml: Ditto.
1519 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
1520 Ditto.
1521 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
1522 Ditto.
1523
15242020-07-09 Dodji Seketeli <dodji@redhat.com>
1525
1526 reader: Remove useless support for WIP types
1527 * src/abg-reader.cc (read_context::m_wip_types_map): Remove data
1528 member.
1529 (read_context::{clear_wip_classes_map, mark_type_as_wip,
1530 unmark_type_as_wip, is_wip_type}): Remove member functions.
1531 (read_context::maybe_canonicalize_type): Remove use of
1532 is_wip_type.
1533
15342020-06-19 Giuliano Procida <gprocida@google.com>
1535
1536 Use pointers not strings in type graph comparison.
1537 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
1538 Update.
1539 * tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt:
1540 Update.
1541 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
1542 Update.
1543 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
1544 Update.
1545
15462020-06-10 Giuliano Procida <gprocida@google.com>
1547
1548 Add tests for declaration-only enums.
1549 * tests/data/test-abidiff-exit/test-decl-enum-report-2.txt: Add
1550 new test reference output.
1551 * tests/data/test-abidiff-exit/test-decl-enum-report-3.txt: Likewise.
1552 * tests/data/test-abidiff-exit/test-decl-enum-report.txt: Likewise.
1553 * tests/data/test-abidiff-exit/test-decl-enum-v{0,1}.c: Add source
1554 code for the binaries below.
1555 * tests/data/test-abidiff-exit/test-decl-enum-v{0,1}.o: Add new
1556 binary test inputs.
1557 * tests/data/Makefile.am: Add the new files above to source
1558 distribution.
1559 * tests/test-abidiff-exit.cc: Add the test inputs above to the
1560 test harness.
1561
15622020-06-10 Giuliano Procida <gprocida@google.com>
1563
1564 Add declaration-only enums to XML reader/writer.
1565 * src/abg-reader.cc (build_enum_type_decl): Detect a
1566 declaration-only enum and flag it as such.
1567 (build_type_decl): Support reading the "is-declaration" attribute.
1568 (build_class_decl): Adjust.
1569 * src/abg-writer.cc (write_is_declaration_only): Renamed
1570 write_class_or_union_is_declaration_only into this.
1571 (write_enum_is_declaration_only): Remove.
1572 (write_type_decl, write_enum_type_decl)
1573 (write_class_decl_opening_tag, write_union_decl_opening_tag): Use
1574 write_is_declaration_only.
1575 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
1576 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
1577 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
1578
15792020-06-10 Dodji Seketeli <dodji@redhat.com>
1580
1581 Support declaration-only enums in DWARF reader.
1582 * src/abg-dwarf-reader.cc (string_enums_map): Define new
1583 convenience typedef.
1584 (read_context::decl_only_enums_map_): Define new data member.
1585 (read_context::{declaration_only_enums,
1586 is_decl_only_enum_scheduled_for_resolution,
1587 resolve_declaration_only_enums}): Define new member functions.
1588 (build_internal_underlying_enum_type_name)
1589 (build_enum_underlying_type): Factorize these functions out of ...
1590 (build_enum_type): ... here. Detect a decl-only enum and flag it
1591 as such. If the enum type is decl-only, then set its underlying
1592 type as decl-only as well.
1593 (build_enum_underlying_type): Mark the underlying type as
1594 artificial.
1595 (get_opaque_version_of_type): Make this handle enums as well. So
1596 make its return type be type_or_decl_base_sptr, rather than just
1597 class_or_union_sptr as it used to be.
1598 (read_debug_info_into_corpus): Add logging to trace decl-only
1599 enums resolution.
1600 (build_ir_node_from_die): Detect when a suppression specification
1601 makes an enum opaque. In that case, get an opaque version of the
1602 enum type by invoking get_opaque_version_of_type. Note that
1603 get_opaque_version_of_type doesn't support returning opaque
1604 -- i.e, decl-only enum types -- yet, but this is going to be
1605 handled in a subsequent patch.
1606
16072020-06-10 Giuliano Procida <gprocida@google.com>
1608
1609 Support incomplete enums in core and diff code.
1610 * include/abg-comp-filter.h (has_decl_only_def_change) : Declare
1611 New function.
1612 * src/abg-comp-filter.cc (there_is_a_decl_only_enum): Define new
1613 static function and ...
1614 (type_size_changed): ... use it here.
1615 (has_decl_only_def_change): Define new function and ...
1616 (categorize_harm{less, ful}_diff_node): ... use it here.
1617 * include/abg-fwd.h (enums_type, decl_base_wptr): Declare new
1618 typedefs.
1619 (look_through_decl_only_class): Declare new overload for
1620 class_or_union*.
1621 (is_compatible_with_enum_type, is_compatible_with_enum_type)
1622 (look_through_decl_only, lookup_enum_types, lookup_enum_types):
1623 Declare new functions.
1624 * include/abg-ir.h (decl_base::{get_is_declaration_only,
1625 set_is_declaration_only, set_definition_of_declaration,
1626 get_definition_of_declaration,
1627 get_naked_definition_of_declaration}): Declare new member
1628 functions. They were moved here from the class_or_union class.
1629 (class_or_union::{get_earlier_declaration,
1630 set_earlier_declaration, get_definition_of_declaration,
1631 set_definition_of_declaration,
1632 get_naked_definition_of_declaration, get_is_declaration_only,
1633 set_is_declaration_only}): Remove these member functions.
1634 * src/abg-ir.cc (decl_base::priv::{declaration_,
1635 definition_of_declaration_, naked_definition_of_declaration_,
1636 is_declaration_only_}): Define data members. Moved here from
1637 class_or_union.
1638 (decl_base::priv::priv): Adjust to initialize the new data
1639 members.
1640 (decl_base::{get_earlier_declaration, set_earlier_declaration,
1641 get_definition_of_declaration,
1642 get_naked_definition_of_declaration, get_is_declaration_only,
1643 set_is_declaration_only, set_definition_of_declaration}): Define
1644 member functions.
1645 (operator|): In the overload for (change_kind, change_kind),
1646 adjust the return type of the call to
1647 decl_base::get_definition_of_declaration.
1648 (look_through_decl_only): Define new function.
1649 (look_through_decl_only_class): Adjust.
1650 (look_through_decl_only_enum): Likewise.
1651 (maybe_update_types_lookup_map<class_decl>): Adjust return type of
1652 call to decl_base::get_definition_of_declaration.
1653 (types_defined_same_linux_kernel_corpus_public): Use
1654 look_through_decl_only_class rather than open coding it.
1655 (class_or_union::priv::{declaration_, definition_of_declaration_,
1656 naked_definition_of_declaration_, is_declaration_only_}): Remove
1657 these data members. They are now carried by decl_base::priv.
1658 (class_or_union::{g,s}et_alignment_in_bits): Adjust.
1659 (class_or_union::{g,s}et_size_in_bits): Likewise.
1660 (class_or_union::operator==): Likewise.
1661 (equals): Adjust the overload for class_or_union.
1662 (is_compatible_with_enum_type)
1663 * src/abg-comparison.cc (try_to_diff<class_decl>): Adjust the
1664 return type of decl_base::get_definition_of_declaration.
1665 (leaf_diff_node_marker_visitor::visit_begin): Use
1666 filtering::has_decl_only_def_change rather than
1667 filtering::has_class_decl_only_def_change. Decl-only changes to
1668 enums (or any other type really) will thus not be recorded as leaf
1669 changes.
1670 * src/abg-dwarf-reader.cc (get_scope_for_die): Adjust return type
1671 of decl_base::get_definition_of_declaration.
1672 * src/abg-default-reporter.cc (default_reporter::report): Report
1673 enum decl-only <-> definition changes.
1674 * src/abg-hash.cc (class_or_union::hash::operator()): In the
1675 overload for class_or_union& adjust the return type for
1676 decl_base::get_definition_of_declaration.
1677
16782020-06-19 Giuliano Procida <gprocida@google.com>
1679
1680 abg-ir.cc: Remove unused re_canonicalize function.
1681 * include/abg-fwd.h (re_canonicalize): Remove declaration of
1682 obsolete function.
1683 * include/abg-ir.h (class {decl_base, type_base}): Remove
1684 re_canonicalize friend declarations from these classes.
1685 * src/abg-ir.cc (re_canonicalize): Remove obsolete function.
1686
16872020-06-24 Dodji Seketeli <dodji@redhat.com>
1688
1689 Bug 26135 - Wrong linkage name causes anonymous classes miscomparison
1690 * include/abg-ir.h (class_decl::class_decl): Add two overloads
1691 that take the "is_anonymous" flag.
1692 (union_decl::union_decl): Likewise.
1693 * src/abg-ir.cc (class_decl::class_decl): Define two overloads
1694 that take the "is_anonymous" flag and set the linkage name
1695 accordingly.
1696 (union_decl::union_decl): Likewise.
1697 (type_base::get_canonical_type_for): Assert that an anonymous
1698 class or union can't have a linkage name for now.
1699 * src/abg-dwarf-reader.cc (add_or_update_class_type)
1700 (add_or_update_union_type): Use a new overload for the constuctor
1701 of {class, union}_decl and set the "is_anonymous" flag. Don't use
1702 decl_base::set_is_anonymous anymore.
1703 * src/abg-reader.cc (build_class_decl, build_union_decl):
1704 Likewise.
1705 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
1706 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
1707 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
1708
17092020-06-29 Giuliano Procida <gprocida@google.com>
1710
1711 Rename declaration-definition change category.
1712 * include/abg-comparison.h (TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY):
1713 Rename CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY into this.
1714 (EVERYTHING_CATEGORY): In the value of this enumerator, rename
1715 CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY into
1716 TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY.
1717 * src/abg-comp-filter.cc (categorize_harmless_diff_node):
1718 Likewise.
1719 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
1720 Likewise.
1721 (operator<<(ostream& o, diff_category c)): Likewise.
1722 * src/abg-default-reporter.cc (default_reporter::report): Likewise
1723 in the overload for class_or_union_diff.
1724 * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise in
1725 the overload for class_or_union_diff.
1726
17272020-06-10 Giuliano Procida <gprocida@google.com>
1728
1729 Tidy build_enum_type state variables.
1730 * src/abg-dwarf-reader.cc (build_enum_type): Rename local
1731 variable enum_is_anonymous to is_anonymous. Move initilisation
1732 of local variable is_artificial to location corresponding to
1733 that in add_or_update_class_type and add_or_update_union_type
1734 functions.
1735
17362020-06-10 Giuliano Procida <gprocida@google.com>
1737
1738 Refactor d.context() as ctxt in report(enum_diff).
1739 * src/abg-default-reporter.cc (report): In the enum_diff
1740 overload, introduce the name ctxt to replace four occurrences
1741 of d.context().
1742
17432020-06-10 Giuliano Procida <gprocida@google.com>
1744
1745 Improve code comments and whitespace.
1746 * include/abg-fwd.h: Correct doc-comment reference to
1747 enum_type_decl.
1748 * src/abg-comp-filter.cc: Fix doc-comment syntax.
1749 * src/abg-comparison.cc (operator<<): In the diff_category
1750 overload, fix code indentation.
1751 * src/abg-default-reporter.cc (report): In the
1752 class_or_union_diff overload, adjust comment to reflect that
1753 the code is reporting changes between declaration-only and
1754 defined types, in either direction.
1755
17562020-06-17 Giuliano Procida <gprocida@google.com>
1757
1758 get_canonical_type_for: restore environment better
1759 * src/abg-ir.cc (get_canonical_type_for): Ensure the
1760 do_on_the_fly_canonicalization and
1761 decl_only_class_equals_definition flags are restored
1762 unconditionally.
1763
17642020-06-18 Dodji Seketeli <dodji@redhat.com>
1765
1766 Bug 26127 - abidw --annotate emits incomplete function types
1767 * include/abg-ir.h (decl_base::clear_qualified_name): Declare new
1768 protected member function.
1769 ({pointer_type_def, reference_type_def, qualified_type_def,
1770 function_type}::on_canonical_type_set): Declare virtual member
1771 functions.
1772 * src/abg-ir.cc (decl_base::clear_qualified_name): Define new
1773 protected member function.
1774 ({pointer_type_def, reference_type_def, qualified_type_def,
1775 function_type}::on_canonical_type_set): Define virtual member
1776 functions.
1777 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
1778 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1779 Likewise.
1780 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1781 Likewise.
1782
17832020-06-11 Giuliano Procida <gprocida@google.com>
1784
1785 Fix bug that suppressed DWARF read tests.
1786 * tests/test-read-dwarf.cc (in_out_specs): Use NULL instead of
1787 empty ABI paths for test25, test26 and test27. (perform):
1788 Check members of spec, rather than locals with same name, when
1789 deciding to terminate testing early; fix some code whitespace.
1790 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Update
1791 multidimensional array sizes.
1792 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Ditto.
1793 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1794 Ditto.
1795 * tests/data/test-read-dwarf/test7.so.abi: Ditto.
1796 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
1797 Update following translation unit ordering change.
1798 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Ditto.
1799 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Ditto.
1800 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Ditto.
1801 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Ditto.
1802 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Ditto.
1803 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
1804 Ditto.
1805 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
1806 Ditto.
1807 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
1808 Ditto.
1809 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Ditto.
1810 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
1811 Ditto.
1812 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Update
1813 following code changes affecting ordering of some ABI
1814 elements.
1815 * tests/data/test-read-dwarf/test16-pr18904.so.abi
1816 Reviewed-by: Matthias Maennich <maennich@google.com>
1817 Tested-by: Matthias Maennich <maennich@google.com>
1818
18192020-06-16 Matthias Maennich <maennich@google.com>
1820
1821 cleanup: std::weak_ptr use: replace manual lock by std::weak_ptr::lock
1822 * src/abg-comparison-priv.h (diff::priv::get_context): improve
1823 weak_ptr usage.
1824 (corpus_diff:diff_stats::priv::ctxt): Likewise.
1825 * src/abg-comparison.cc (corpus_diff::priv::get_context): Likewise.
1826 (var_diff::type_diff): Likewise.
1827 * src/abg-ir.cc (elf_symbol::get_next_alias): Likewise.
1828 (elf_symbol::get_next_common_instance): Likewise.
1829 (type_base::get_canonical_type): Likewise.
1830 (qualified_type_def::get_underlying_type): Likewise.
1831 (pointer_type_def::get_pointed_to_type): Likewise.
1832 (reference_type_def::get_pointed_to_type): Likewise.
1833 (array_type_def::subrange_type::get_underlying_type): Likewise.
1834 (array_type_def::get_element_type): Likewise.
1835 (typedef_decl::get_underlying_type): Likewise.
1836 (var_decl::get_type): Likewise.
1837 (function_type::get_return_type): Likewise.
1838 (function_decl::get_type): Likewise.
1839 (function_decl::parameter::get_type): Likewise.
1840 (class_or_union::get_naming_typedef): Likewise.
1841 (class_or_union::get_definition_of_declaration): Likewise.
1842 (class_decl::base_spec::get_base_class): Likewise.
1843 (template_parameter::get_enclosing_template_decl): Likewise.
1844 (non_type_tparameter::get_type): Likewise.
1845 (type_composition::get_composed_type): Likewise.
1846
18472020-06-16 Giuliano Procida <gprocida@google.com>
1848
1849 Fix leaf-mode formatting of decl <-> defn diffs.
1850 * src/abg-leaf-reporter.cc (leaf_reporter::report): In the
1851 class_or_union_diff overload, add a terminating new line after
1852 reporting a declaration-only <-> definition difference.
1853
18542020-06-15 Giuliano Procida <gprocida@google.com>
1855
1856 abg-writer: Add support for stable hash type ids.
1857 * doc/manuals/abidw.rst: Replace stray documentation of
1858 --named-type-ids with documention of new --type-id-style
1859 option.
1860 * include/abg-writer.h (type_id_style_kind): Add new enum.
1861 (set_type_id_style): Add new write_context setter.
1862 (set_common_options): Set type id style in write context.
1863 * include/abg-hash.h (fnv_hash): Declare new 32-bit FNV-1a
1864 hash function in abigail::hashing namespace.
1865 * src/abg-hash.h (fnv_hash): Define new 32-bit FNV-1a hash
1866 function in abigail::hashing namespace.
1867 * src/abg-writer.cc (write_context): Add m_type_id_style
1868 member to record type style to use, defaulting to
1869 SEQUENCE_TYPE_ID_STYLE; add m_used_type_id_hashes to record
1870 already-used hashes.
1871 (write_context::get_type_id_style): Add new getter.
1872 (write_context::set_type_id_style): Add new setter.
1873 (get_id_for_type): Add support for HASH_TYPE_ID_STYLE style.
1874 (set_type_id_style): Add new helper function.
1875 * tools/abidw.cc (options): Add type_id_style member.
1876 (display_usage): Add description of --type-id-style option.
1877 (parse_command_line): Parse --type-id-style option.
1878 * tests/data/Makefile.am: Add new hash type id ABI files.
1879 * tests/test-read-dwarf.cc: (InOutSpec): Add type_id_style
1880 member.
1881 (in_out_specs): Set type_id_style to SEQUENCE_TYPE_ID_STYLE in
1882 existing test specifications. Duplicate first 9 test cases
1883 with type_id_style set to HASH_TYPE_ID_STYLE.
1884 * tests/data/test-read-dwarf/test0.hash.abi: New ABI XML file
1885 with hash type ids.
1886 * tests/data/test-read-dwarf/test1.hash.abi: Ditto.
1887 * tests/data/test-read-dwarf/test2.so.hash.abi: Ditto.
1888 * tests/data/test-read-dwarf/test3.so.hash.abi: Ditto.
1889 * tests/data/test-read-dwarf/test4.so.hash.abi: Ditto.
1890 * tests/data/test-read-dwarf/test5.o.hash.abi: Ditto.
1891 * tests/data/test-read-dwarf/test6.so.hash.abi: Ditto.
1892 * tests/data/test-read-dwarf/test7.so.hash.abi: Ditto.
1893 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi:
1894 Ditto.
1895
18962020-06-12 Giuliano Procida <gprocida@google.com>
1897
1898 Eliminate non-ASCII characters.
1899 * include/abg-diff-utils.h: Replace "’’" with "'".
1900 * src/abg-elf-helpers.cc: Replace "⋅" with ".".
1901 * src/abg-ini.cc: Replace "@êef" with "@ref".
1902 * src/abg-ir.cc: Ditto.
1903 * src/abg-tools-utils.cc: Replace "–" with "-".
1904
19052020-06-11 Matthias Maennich <maennich@google.com>
1906
1907 dwarf-reader: get_die_source: always initialize return value
1908 * src/abg-dwarf-reader.cc
1909 (read_context::get_die_source): Always initialize die_source.
1910 (read_context::ContainerType::get_container): Fix
1911 initialization of die_source.
1912 (read_context::compute_canonical_die): Likewise.
1913 (read_context::get_canonical_die): Likewise.
1914 (read_context::get_or_compute_canonical_die): Likewise.
1915 (read_context::associate_die_to_decl): Likewise.
1916 (read_context::set_canonical_die_offset): Likewise.
1917 (read_context::schedule_type_for_late_canonicalization): Likewise.
1918 (read_context::compare_dies): Likewise.
1919 (read_context::get_parent_die): Likewise.
1920 (read_context::get_scope_for_die): Likewise.
1921 (read_context::add_or_update_union_type): Likewise.
1922 (read_context::maybe_canonicalize_type): Likewise.
1923 (read_context::build_ir_node_from_die): Likewise.
1924
19252020-06-09 Matthias Maennich <maennich@google.com>
1926
1927 abipkgdiff: remove unused includes of elfutils/libdw.h and elf.h
1928 * tools/abipkgdiff.cc: Drop unused includes.
1929
19302020-05-29 Matthias Maennich <maennich@google.com>
1931
1932 abg-reporter: fully qualify std::string and std::ostream
1933 * include/abg-reporter.h (reporter_base::report) fully qualify
1934 std::string and std::ostream for all overloads.
1935 (default_reporter::report_local_typedef_changes): Likewise.
1936 (default_reporter::report_local_qualified_type_changes): Likewise.
1937 (default_reporter::report_local_reference_type_changes): Likewise.
1938 (default_reporter::report_local_function_type_changes): Likewise.
1939 (default_reporter::report): Likewise.
1940 (leaf_reporter::report_changes_from_diff_maps): Likewise.
1941 (leaf_reporter::report): Likewise.
1942 Suggested-by: Mark Barolak <mbar@google.com>
1943
19442020-06-05 Giuliano Procida <gprocida@google.com>
1945
1946 Fix HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY spelling
1947 * include/abg-comparison.h (enum diff_category): Rename
1948 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY enumerator to
1949 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY.
1950 * src/abg-comp-filter.cc (categorize_harmless_diff_node): Replace
1951 use of HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY enumerator with
1952 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY.
1953 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
1954 Replace use of HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY enumerator
1955 with HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY.
1956 (operator<<): In the diff_category overload, replace use of
1957 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY enumerator with
1958 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY and output correct
1959 spelling for both this and HARMLESS_UNION_CHANGE_CATEGORY.
1960 * tools/abicompat.cc (create_diff_context): Replace use of
1961 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY enumerator with
1962 HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY.
1963
19642020-05-18 Matthias Maennich <maennich@google.com>
1965
1966 dwarf-reader: read_context: drop unused symbol versioning code
1967 * src/abg-dwarf-reader.cc
1968 (read_context::versym_section_): Delete.
1969 (read_context::verdef_section_): Delete.
1970 (read_context::verneed_section_): Delete.
1971 (read_context::symbol_versionning_sections_loaded_): Delete.
1972 (read_context::symbol_versionning_sections_found_): Delete.
1973 (read_context::initialize): Remove initializations of deleted members.
1974 (read_context::get_symbol_versionning_sections): Delete.
1975 (read_context::get_version_for_symbol): Delete.
1976 (read_context::lookup_elf_symbol_from_index): Use
1977 get_version_for_symbol provided by elf_helpers.
1978
19792020-05-18 Matthias Maennich <maennich@google.com>
1980
1981 dwarf-reader: Remove unused code
1982 * src/abg-dwarf-reader.cc
1983 (lookup_public_variable_symbol_from_elf): Delete.
1984 (read_context::bss_section_): Delete.
1985 (read_context::text_section_): Delete.
1986 (read_context::rodata_section_): Delete.
1987 (read_context::data_section_): Delete.
1988 (read_context::data1_section_): Delete.
1989 (read_context::initialize): Remove initializations of deleted members.
1990 (read_context::options): Delete.
1991 (read_context::bss_section): Delete.
1992 (read_context::text_section): Delete.
1993 (read_context::rodata_section): Delete.
1994 (read_context::data_section): Delete.
1995 (read_context::data1_section): Delete.
1996 (read_context::get_elf_file_type): Delete.
1997 (read_context::lookup_symbol_from_elf): Delete.
1998 (read_context::lookup_public_variable_symbol_from_elf): Delete.
1999 (read_context::fun_addr_sym_map_sptr): Delete.
2000 (read_context::fun_addr_sym_map): Delete.
2001 (read_context::get_data_section_for_variable_address): Delete.
2002 (read_context::suppression_matches_function_sym_name): Delete.
2003 (read_context::suppression_matches_function_name): Delete.
2004 (read_context::suppression_matches_type_name): Delete.
2005
20062020-05-29 Dodji Seketeli <dodji@redhat.com>
2007
2008 abigail.m4: Fix copyright notice
2009 * abigail.m4: Mention Red Hat in the copyright and myself as author.
2010
20112020-05-18 Matthias Maennich <maennich@google.com>
2012
2013 tests: Add kernel symtab test suite
2014 * tests/data/Makefile.am: add new test data for runtestsymtab
2015 * tests/data/test-symtab/kernel-4.14/Makefile: New test case makefile.
2016 * tests/data/test-symtab/kernel-4.14/empty.c: Likewise.
2017 * tests/data/test-symtab/kernel-4.14/one_of_each.c: Likewise.
2018 * tests/data/test-symtab/kernel-4.14/single_function.c: Likewise.
2019 * tests/data/test-symtab/kernel-4.14/single_function_gpl.c: Likewise.
2020 * tests/data/test-symtab/kernel-4.14/single_variable.c: Likewise.
2021 * tests/data/test-symtab/kernel-4.14/single_variable_gpl.c: Likewise.
2022 * tests/data/test-symtab/kernel-4.14/empty.ko: New test data.
2023 * tests/data/test-symtab/kernel-4.14/one_of_each.ko: Likewise.
2024 * tests/data/test-symtab/kernel-4.14/single_function.ko: Likewise.
2025 * tests/data/test-symtab/kernel-4.14/single_function_gpl.ko: Likewise.
2026 * tests/data/test-symtab/kernel-4.14/single_variable.ko: Likewise.
2027 * tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko: Likewise.
2028 * tests/data/test-symtab/kernel-4.19/Makefile: New test case makefile.
2029 * tests/data/test-symtab/kernel-4.19/empty.c: Likewise.
2030 * tests/data/test-symtab/kernel-4.19/one_of_each.c: Likewise.
2031 * tests/data/test-symtab/kernel-4.19/single_function.c: Likewise.
2032 * tests/data/test-symtab/kernel-4.19/single_function_gpl.c: Likewise.
2033 * tests/data/test-symtab/kernel-4.19/single_variable.c: Likewise.
2034 * tests/data/test-symtab/kernel-4.19/single_variable_gpl.c: Likewise.
2035 * tests/data/test-symtab/kernel-4.19/empty.ko: New test data.
2036 * tests/data/test-symtab/kernel-4.19/one_of_each.ko: Likewise.
2037 * tests/data/test-symtab/kernel-4.19/single_function.ko: Likewise.
2038 * tests/data/test-symtab/kernel-4.19/single_function_gpl.ko: Likewise.
2039 * tests/data/test-symtab/kernel-4.19/single_variable.ko: Likewise.
2040 * tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko: Likewise.
2041 * tests/data/test-symtab/kernel-5.4/Makefile: New test case makefile.
2042 * tests/data/test-symtab/kernel-5.4/empty.c: Likewise.
2043 * tests/data/test-symtab/kernel-5.4/one_of_each.c: Likewise.
2044 * tests/data/test-symtab/kernel-5.4/single_function.c: Likewise.
2045 * tests/data/test-symtab/kernel-5.4/single_function_gpl.c: Likewise.
2046 * tests/data/test-symtab/kernel-5.4/single_variable.c: Likewise.
2047 * tests/data/test-symtab/kernel-5.4/single_variable_gpl.c: Likewise.
2048 * tests/data/test-symtab/kernel-5.4/empty.ko: New test data.
2049 * tests/data/test-symtab/kernel-5.4/one_of_each.ko: Likewise.
2050 * tests/data/test-symtab/kernel-5.4/single_function.ko: Likewise.
2051 * tests/data/test-symtab/kernel-5.4/single_function_gpl.ko: Likewise.
2052 * tests/data/test-symtab/kernel-5.4/single_variable.ko: Likewise.
2053 * tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko: Likewise.
2054 * tests/data/test-symtab/kernel-5.6/Makefile: New test case makefile.
2055 * tests/data/test-symtab/kernel-5.6/empty.c: Likewise.
2056 * tests/data/test-symtab/kernel-5.6/one_of_each.c: Likewise.
2057 * tests/data/test-symtab/kernel-5.6/single_function.c: Likewise.
2058 * tests/data/test-symtab/kernel-5.6/single_function_gpl.c: Likewise.
2059 * tests/data/test-symtab/kernel-5.6/single_variable.c: Likewise.
2060 * tests/data/test-symtab/kernel-5.6/single_variable_gpl.c: Likewise.
2061 * tests/data/test-symtab/kernel-5.6/empty.ko: New test data.
2062 * tests/data/test-symtab/kernel-5.6/one_of_each.ko: Likewise.
2063 * tests/data/test-symtab/kernel-5.6/single_function.ko: Likewise.
2064 * tests/data/test-symtab/kernel-5.6/single_function_gpl.ko: Likewise.
2065 * tests/data/test-symtab/kernel-5.6/single_variable.ko: Likewise.
2066 * tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko: Likewise.
2067 * tests/data/test-symtab/kernel/Makefile: New test case source file.
2068 * tests/data/test-symtab/kernel/empty.c: Likewise.
2069 * tests/data/test-symtab/kernel/one_of_each.c: Likewise.
2070 * tests/data/test-symtab/kernel/single_function.c: Likewise.
2071 * tests/data/test-symtab/kernel/single_function_gpl.c: Likewise.
2072 * tests/data/test-symtab/kernel/single_variable.c: Likewise.
2073 * tests/data/test-symtab/kernel/single_variable_gpl.c: Likewise.
2074 * tests/test-symtab.cc: New test case to test kernel symtabs.
2075
20762020-05-18 Matthias Maennich <maennich@google.com>
2077
2078 tests: Add symtab test suite
2079 * tests/Makefile.am: add new test runtestsymtab
2080 * tests/data/Makefile.am: add new test data for runtestsymtab
2081 * tests/data/test-symtab/Makefile: Add this to build the binaries
2082 below from their source code.
2083 * tests/data/test-symtab/basic/empty.c: New test case source.
2084 * tests/data/test-symtab/basic/link_against_me.c: Likewise.
2085 * tests/data/test-symtab/basic/no_debug_info.c: Likewise.
2086 * tests/data/test-symtab/basic/one_function_one_variable.c: Likewise.
2087 * tests/data/test-symtab/basic/one_function_one_variable_undefined.c: Likewise.
2088 * tests/data/test-symtab/basic/single_function.c: Likewise.
2089 * tests/data/test-symtab/basic/single_undefined_function.c: Likewise.
2090 * tests/data/test-symtab/basic/single_undefined_variable.c: Likewise.
2091 * tests/data/test-symtab/basic/single_variable.c: Likewise.
2092 * tests/data/test-symtab/basic/empty.so: New test data, built from
2093 the Makefile above.
2094 * tests/data/test-symtab/basic/link_against_me.so: Likewise.
2095 * tests/data/test-symtab/basic/no_debug_info.so: Likewise.
2096 * tests/data/test-symtab/basic/one_function_one_variable.so: Likewise.
2097 * tests/data/test-symtab/basic/one_function_one_variable_undefined.so: Likewise.
2098 * tests/data/test-symtab/basic/single_function.so: Likewise.
2099 * tests/data/test-symtab/basic/single_undefined_function.so: Likewise.
2100 * tests/data/test-symtab/basic/single_undefined_variable.so: Likewise.
2101 * tests/data/test-symtab/basic/single_variable.so: Likewise.
2102 * tests/test-symtab.cc: New test driver.
2103
21042020-05-19 Dodji Seketeli <dodji@redhat.com>
2105
2106 Bug 25989 - type_topo_comp doesn't meet irreflexive requirements
2107 * src/abg-ir.cc (type_topo_comp::operator()): In the comparison
2108 operator consider two equivalent empty-qualified types as being
2109 topologically equivalent.
2110
21112020-05-07 Dodji Seketeli <dodji@redhat.com>
2112
2113 Bug 25661 - Support data member replacement by anonymous data member
2114 * include/abg-comp-filter.h (has_data_member_replaced_by_anon_dm):
2115 Declare new function.
2116 * include/abg-comparison.h (changed_var_sptr)
2117 (changed_var_sptrs_type): Declare new typedefs.
2118 (HARMLESS_DATA_MEMBER_CHANGE_CATEGORY): Add a new enumerator to
2119 the diff_category enum.
2120 (EVERYTHING_CATEGORY): In the diff_category, adjust this
2121 enumerator to OR the new HARMLESS_DATA_MEMBER_CHANGE_CATEGORY into
2122 it.
2123 (SUPPRESSED_CATEGORY, PRIVATE_TYPE_CATEGORY)
2124 (SIZE_OR_OFFSET_CHANGE_CATEGORY, VIRTUAL_MEMBER_CHANGE_CATEGORY)
2125 (CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY)
2126 (FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY)
2127 (FN_RETURN_TYPE_CV_CHANGE_CATEGORY, VAR_TYPE_CV_CHANGE_CATEGORY)
2128 (VOID_PTR_TO_PTR_CHANGE_CATEGORY)
2129 (BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY): Adjust the value of these
2130 enumerators of the diff_category enum.
2131 (class_or_union_diff::{data_members_replaced_by_adms,
2132 ordered_data_members_replaced_by_adms}): Declare new member
2133 functions.
2134 * include/abg-fwd.h (var_decl_wptr): Declare new typedef.
2135 (get_next_data_member, get_first_non_anonymous_data_member)
2136 (find_data_member_from_anonymous_data_member)
2137 (get_absolute_data_member_offset): Declare new functions.
2138 * include/abg-ir.h (struct anonymous_dm_hash): Declare new type.
2139 (anonymous_data_member_sptr_set_type): Declare new typedef.
2140 (class decl_base): Befriend class class_or_union.
2141 (class dm_context_rel): Pimpl-ify this class.
2142 (dm_context_rel::{g,s}et_anonymous_data_member_types): Declare new
2143 member functions.
2144 (var_decl::get_anon_dm_reliable_name): Declare new member
2145 function.
2146 (class var_decl): Make get_absolute_data_member_offset,
2147 get_absolute_data_member_offset be friends of this.
2148 (class_or_union::maybe_fixup_members_of_anon_data_member): Declare
2149 new protected member function.
2150 * src/abg-comp-filter.cc (has_data_member_replaced_by_anon_dm):
2151 Define new function.
2152 (categorize_harmless_diff_node): Use the above.
2153 * src/abg-comparison-priv.h
2154 (class_or_union_diff::priv::{dms_replaced_by_adms_,
2155 changed_var_sptrs_type dms_replaced_by_adms_ordered_}): Add new
2156 data members.
2157 (data_member_comp::compare_data_members): Factorize this out of ...
2158 (data_member_comp::operator()(decl_base_sptr&, decl_base_sptr&)):
2159 ... this.
2160 (data_member_comp::operator()(changed_var_sptr&,
2161 changed_var_sptr&)): Add new member function.
2162 (sort_changed_data_members): Declare ...
2163 * src/abg-comparison.cc (sort_changed_data_members): ... new
2164 function.
2165 (get_default_harmless_categories_bitmap): Adjust to take the new
2166 abigail::comparison::HARMLESS_DATA_MEMBER_CHANGE_CATEGORY into
2167 account.
2168 (operator<<(ostream& o, diff_category c)): Likewise.
2169 (class_or_union_diff::ensure_lookup_tables_populated): Handle
2170 Handle the insertion of anonymous data members to replace existing
2171 data members.
2172 (class_or_union_diff::{data_members_replaced_by_adms,
2173 ordered_data_members_replaced_by_adms}): Define new accessors.
2174 (suppression_categorization_visitor::visit_end): Propagate the
2175 SUPPRESSION_CATEGORIZATION_VISITOR from changes to the type of the
2176 data member if the data member doesn't have real local changes.
2177 * src/abg-default-reporter.cc (default_reporter::report): Report
2178 about anonymous data members that replace data members.
2179 * src/abg-ir.cc (struct dm_context_rel::priv): Define new data
2180 structure.
2181 (dm_context_rel::{dm_context_rel, get_is_laid_out,
2182 set_is_laid_out, get_offset_in_bits, set_offset_in_bits,
2183 operator==, operator!=, get_anonymous_data_member,
2184 set_anonymous_data_member}): Define the member functions here as
2185 they are not inline anymore.
2186 (class_or_union::maybe_fixup_members_of_anon_data_member): Define
2187 new member function.
2188 (class_or_union::add_data_member): Use it.
2189 (get_first_non_anonymous_data_member, get_next_data_member)
2190 (get_absolute_data_member_offset)
2191 (find_data_member_from_anonymous_data_member): Define new
2192 functions.
2193 * src/abg-reporter-priv.h
2194 (maybe_report_data_members_replaced_by_anon_dm): Declare ...
2195 * src/abg-reporter-priv.cc
2196 (maybe_report_data_members_replaced_by_anon_dm): ... new function.
2197 * src/abg-leaf-reporter.cc (leaf_reporter::report): Report data
2198 members replaced by anonymous data members.
2199 * tests/data/test-diff-filter/test-PR25661-[1-6]-report-[1-4].txt: New
2200 test reference outputs.
2201 * tests/data/test-diff-filter/test-PR25661-[1-6]-v{0,1}.c: Test
2202 source code files.
2203 * tests/data/test-diff-filter/test-PR25661-[1-6]-v{0,1}.o: Test
2204 binary input files.
2205 * tests/data/Makefile.am: Add the new test files above to source
2206 distribution.
2207 * tests/test-diff-filter.cc (in_out_specs): Add the binary test
2208 inputs above to this test harness.
2209 * tests/data/test-diff-dwarf/test45-anon-dm-change-report-0.txt:
2210 Adjust.
2211
22122020-05-07 Dodji Seketeli <dodji@redhat.com>
2213
2214 dwarf-reader: support several anonymous data members in a given class
2215 * include/abg-ir.h (class_or_union::find_anonymous_data_member):
2216 Declare a new member function.
2217 (class_or_union::find_data_member): Declare a new overload.
2218 (var_decl::get_anon_dm_reliable_name): Declare new member
2219 function.
2220 * src/abg-ir.cc (var_decl::get_pretty_representation): Make this
2221 work on a var_decl is going to be used to represent an anonymous
2222 data member even before the var_decl has been added to its finale
2223 scope. This is useful to make class_or_union::find_data_member
2224 work on a var_decl that is to be used as an anonymous data member.
2225 (var_decl::get_anon_dm_reliable_name): Define new member function.
2226 (class_or_union::find_data_member): In the existing overload that
2227 takes a string, look for the named data member inside the
2228 anonymous data members. Define a new overload that takes a
2229 var_decl_sptr, to look for anonymous data members.
2230 (class_or_union::find_anonymous_data_member): Define a new member
2231 function.
2232 (lookup_data_member): Use the existing
2233 class_or_union::find_data_member.
2234 * src/abg-reader.cc: (build_class_decl): Use the full anonymous
2235 variable for lookup, rather than its name which is empty and will
2236 thus give false positives.
2237 * src/abg-dwarf-reader.cc (add_or_update_class_type): Likewise.
2238 * src/abg-comparison.cc
2239 (class_or_union_diff::ensure_lookup_tables_populated): Name
2240 anonymous data members properly - as opposed to wrongly using
2241 their empty name.
2242 * src/abg-reporter-priv.cc (represent): In the overload for
2243 var_diff_sptr, make sure that changes to the /type/ of a variable
2244 declaration are always reported.
2245 * tests/data/test-abidiff-exit/test-member-size-report0.txt:
2246 Adjust as we now emit more detailed changes about anonymous data
2247 members.
2248 * tests/data/test-abidiff-exit/test-member-size-report1.txt:
2249 Likewise.
2250 * tests/data/test-annotate/test-anonymous-members-0.o.abi: Adjust
2251 to reflect the fact that a class can now have several anonymous
2252 data members.
2253 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
2254 Likewise.
2255 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
2256 Likewise.
2257 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
2258 Likewise.
2259 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
2260 Likewise.
2261
22622020-05-07 Dodji Seketeli <dodji@redhat.com>
2263
2264 {default,leaf}-reporter: group data members changes reports together
2265 * include/abg-comparison.h
2266 (class_or_union_diff::{sorted_changed_data_members,
2267 count_filtered_changed_data_members,
2268 sorted_subtype_changed_data_members,
2269 count_filtered_subtype_changed_data_members}): Declare ...
2270 * src/abg-comparison.cc
2271 (class_or_union_diff::{sorted_changed_data_members,
2272 count_filtered_changed_data_members,
2273 sorted_subtype_changed_data_members,
2274 count_filtered_subtype_changed_data_members}): ... accessors for
2275 existing private data members.
2276 * src/abg-default-reporter.cc (default_reporter::report): In the
2277 class_or_union_diff& overload, group the reporting of the changes
2278 to data member sub-types with the replacement of data members.
2279 These are just data member changes after all. Use the newly
2280 declared accessors for better measure.
2281 * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise.
2282 * tests/data/test-diff-dwarf/test45-anon-dm-change-report-0.txt: Adjust.
2283 * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise.
2284 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
2285 Likewise.
2286
22872020-05-18 Dodji Seketeli <dodji@redhat.com>
2288
2289 Add -g back to ABIGAIL_DEVEL
2290 * configure.ac: Don't forget to set -g when ABIGAIL_DEVEL is set.
2291
22922020-05-15 Giuliano Procida <gprocida@google.com>
2293
2294 clang-format: set continuation indentation to 2
2295 * .clang-format: Set ContinuationIndentWidth to 2.
2296
22972020-05-15 Matthias Maennich <maennich@google.com>
2298
2299 configure: add more diagnostic options when ABIGAIL_DEVEL is set
2300 * configure.ac: add -D_FORTIFY_SOURCE=2 and -D_GLIBCXX_DEBUG
2301 compilation defines if ABIGAIL_DEVEL is set. Note that with GCC 4.8.5,
2302 -D_FORTIFY_SOURCE=2 requires options to be set. So I am setting
2303 the optimization level to -Og.
2304 * src/abg-dwarf-reader.cc (read_context::{compute_canonical_die,
2305 get_or_compute_canonical_die, associate_die_to_decl,
2306 set_canonical_die_offset, schedule_type_for_late_canonicalization,
2307 compare_dies}, get_scope_for_die, add_or_update_union_type)
2308 (read_debug_info_into_corpus, build_ir_node_from_die): Initialize
2309 the 'source' variable.
2310 * tests/test-diff-filter.cc (main): Check the return value of the
2311 system function.
2312 * tests/test-diff-pkg.cc (main): Likewise.
2313 * tests/test-read-write.cc (main): Likewise.
2314
23152020-05-15 Matthias Maennich <maennich@google.com>
2316
2317 configure: add ABIGAIL_DEBUG options
2318 * configure.ac: add ABIGAIL_DEBUG environment variable for
2319 improved debugging capabilities
2320
23212020-05-05 Giuliano Procida <gprocida@google.com>
2322
2323 Tidy get_pretty_representation qualified_name.
2324 * include/abg-ir.h (type_decl::get_pretty_representation)
2325 Change default for qualified_name parameter to true.
2326
23272020-05-13 Dodji Seketeli <dodji@redhat.com>
2328
2329 Bug 25986 - Wrong name of function type used in change report
2330 * src/abg-ir.cc (function_type::get_cached_name): Don't cache
2331 names for non-canonicalized types.
2332 * tests/data/test-abidiff-exit/test-fun-param-report.txt: Add
2333 reference output for new test.
2334 * tests/data/test-abidiff-exit/test-fun-param-v{0,1}.abi: Add new test
2335 input files.
2336 * tests/data/test-abidiff-exit/test-fun-param-v{0,1}.c: Add source
2337 files for the above.
2338 * tests/data/test-abidiff-exit/test-fun-param-v{0,1}.o: Add
2339 binaries for the above.
2340
23412020-05-11 Mark Wielaard <mark@klomp.org>
2342
2343 Don't iterate before the start of a RandomAccessOutputIterator.
2344 * include/abg-diff-utils.h (compute_diff): Put brackets around
2345 p[ux].[xy]() + 1 calculation.
2346
23472020-05-12 Giuliano Procida <gprocida@google.com>
2348
2349 doc: Fix sufficient suppression property lists.
2350 * doc/manuals/libabigail-concepts.rst: Add missing
2351 sufficient properties for suppress_file, suppress_function and
2352 suppress_variable. Use consistent language about what will
2353 happen when no property in the list in provided.
2354
23552020-05-11 Matthias Maennich <maennich@google.com>
2356
2357 cxx-compat: add test suite for cxx-compat
2358 * tests/Makefile.am: Add new test case runtestcxxcompat.
2359 * tests/test-cxx-compat.cc: New test source file.
2360 Reviewed-by: Giuliano Procida <gprocida@google.com>
2361
23622020-05-11 Matthias Maennich <maennich@google.com>
2363
2364 dwarf-reader: read_context: drop some unused accessor methods
2365 * src/abg-dwarf-reader.cc (read_context::fun_syms_sptr): Delete method.
2366 (read_context::fun_syms): Likewise.
2367 (read_context::var_syms_sptr): Likewise.
2368 (read_context::var_syms): Likewise.
2369 (read_context::undefined_fun_syms_sptr): Likewise.
2370 (read_context::undefined_fun_syms): Likewise. Both overloads.
2371 (read_context::undefined_var_syms_sptr): Likewise.
2372 (read_context::undefined_var_syms): Likewise. Both overloads.
2373 Reviewed-by: Giuliano Procida <gprocida@google.com>
2374
23752020-05-11 Matthias Maennich <maennich@google.com>
2376
2377 tests/.gitignore: ignore all files starting with runtest*
2378 * tests/.gitignore: gitignore all files named runtest*
2379 Reviewed-by: Giuliano Procida <gprocida@google.com>
2380
23812020-05-11 Matthias Maennich <maennich@google.com>
2382
2383 configure: set -Wno-error-overloaded-virtual for clang builds
2384 * configure.ac: set -Wno-error-overloaded-virtual for clang++
2385
23862020-05-05 Giuliano Procida <gprocida@google.com>
2387
2388 Let std::unordered_map::operator[] insert keys.
2389 * src/abg-reader.cc (read_context::key_type_decl): Rely on
2390 std::unordered_map::operator[] to create map entries if they
2391 are missing. (build_elf_symbol_db): Ditto.
2392
23932020-05-05 Giuliano Procida <gprocida@google.com>
2394
2395 abg-reader.cc: Remove key_replacement_type_map.
2396 * src/abg-reader.cc (key_replacement_type_map): Drop unused
2397 function.
2398
23992020-05-04 Giuliano Procida <gprocida@google.com>
2400
2401 Refactor read_parameter_spec_from_string logic.
2402 * src/abg-suppression.cc (read_parameter_spec_from_string):
2403 Use separate string and regex variables to simplify the
2404 creation of returned parameter specification.
2405 Reviewed-by: Matthias Maennich <maennich@google.com>
2406
24072020-05-04 Giuliano Procida <gprocida@google.com>
2408
2409 Use regex::match wrapper instead of regexec.
2410 * src/abg-corpus-priv.h: Mechanically substitute use of
2411 regexec with regex::match wrapper.
2412 * src/abg-suppression-priv.h: Ditto.
2413 * src/abg-suppression.cc: Ditto.
2414 Reviewed-by: Matthias Maennich <maennich@google.com>
2415
24162020-05-12 Giuliano Procida <gprocida@google.com>
2417
2418 Tidy checks for sufficient suppression properties.
2419 * src/abg-suppression.cc (check_sufficient_props): New helper
2420 function to check for sufficient properties in a section.
2421 (read_type_suppression): Replace conditional logic with call
2422 to check_sufficient_props.
2423 (read_function_suppression): Ditto.
2424 (read_variable_suppression): Ditto.
2425 (read_file_suppression): Ditto.
2426 * tests/data/test-diff-suppr/test15-suppr-added-fn-4.suppr:
2427 Explain why the suppression will be ignored.
2428 * tests/data/test-diff-suppr/test16-suppr-removed-fn-4.suppr:
2429 Ditto.
2430 * tests/data/test-diff-suppr/test17-suppr-added-var-4.suppr:
2431 Ditto.
2432 * tests/data/test-diff-suppr/test18-suppr-removed-var-4.suppr:
2433 Ditto.
2434
24352020-05-12 Dodji Seketeli <dodji@redhat.com>
2436
2437 Bug 25977 - runtestabidiffexit regression on EL7
2438 * abg-comparison.cc:
2439 (suppression_categorization_visitor::visit_end): Don't suppress
2440 the entire class of equivalence of a function diff node if that
2441 function diff node itself was not suppressed.
2442
24432020-05-04 Giuliano Procida <gprocida@google.com>
2444
2445 Use regex::compile wrapper instead of regcomp.
2446 * src/abg-corpus-priv.h: Mechanically substitute use of
2447 regcomp with regex::compile wrapper.
2448 * src/abg-suppression-priv.h: Ditto.
2449 There are no behavioural changes.
2450 Reviewed-by: Matthias Maennich <maennich@google.com>
2451
24522020-05-04 Giuliano Procida <gprocida@google.com>
2453
2454 Add POSIX regex wrapper functions.
2455 * include/abg-regex.h (compile): Declare new function.
2456 (match): Declare new function.
2457 * src/abg-regex.cc (compile): Add new function wrapping
2458 regcomp. (match): Add new function wrapping regexec.
2459 Reviewed-by: Matthias Maennich <maennich@google.com>
2460
24612020-05-04 Giuliano Procida <gprocida@google.com>
2462
2463 abg-suppression.cc: More uniform variable naming.
2464 * src/abg-suppression.cc (read_type_suppression): Rename "nil"
2465 variable to "result" and reset it instead of introducing
2466 "suppr" later on. (read_function_suppression): Rename "nil"
2467 variable to "result" and reset it instead of introducing
2468 "result" later on.
2469 Reviewed-by: Matthias Maennich <maennich@google.com>
2470
24712020-05-04 Giuliano Procida <gprocida@google.com>
2472
2473 Escape names used in symbol whitelisting regex.
2474 * include/regex.h (escape): New string reference holder
2475 class. (operator<<): Declaration of std::ostream,
2476 regex::escape overload.
2477 * include/regex.cc (operator<<): New std::ostream,
2478 regex::escape overload that outputs regex-escaped strings.
2479 * src/abg-tools-utils.cc
2480 (gen_suppr_spec_from_kernel_abi_whitelists): Make sure any
2481 special regex characters in symbol names are escaped.
2482 Reviewed-by: Matthias Maennich <maennich@google.com>
2483
24842020-05-04 Giuliano Procida <gprocida@google.com>
2485
2486 Document ^_^ regex in generate_from_strings.
2487 * src/abg-regex.cc (generate_from_strings): Document ^_^
2488 regex.
2489
24902020-05-04 Giuliano Procida <gprocida@google.com>
2491
2492 Tidy #includes in a few files.
2493 * src/abg-corpus-priv.h: Separate and sort #include
2494 directives.
2495 * src/abg-corpus.cc: Ditto.
2496 * src/abg-regex.cc: Ditto.
2497 * src/abg-suppression-priv.h: Ditto.
2498 * src/abg-suppression.cc: Ditto.
2499
25002020-05-01 Giuliano Procida <gprocida@google.com>
2501
2502 Hoist some common expressions evaluating offsets.
2503 * src/abg-suppression.cc (type_suppression::suppresses_diff):
2504 Hoist some constant expressions out of loops.
2505 Reviewed-by: Matthias Maennich <maennich@google.com>
2506
25072020-05-01 Giuliano Procida <gprocida@google.com>
2508
2509 Make set_drops_artifact_from_ir non-const.
2510 * include/abg-suppression.h
2511 (suppression_base::set_drops_artifact_from_ir):
2512 Drop const qualifier.
2513 * src/abg-suppression.cc
2514 (suppression_base::set_drops_artifact_from_ir):
2515 Drop const qualifier.
2516 Reviewed-by: Matthias Maennich <maennich@google.com>
2517
25182020-05-01 Giuliano Procida <gprocida@google.com>
2519
2520 Eliminate redundant conditional operators.
2521 * src/abg-corpus.cc (corpus::priv::build_unreferenced_symbols_tables):
2522 Eliminate redundant conditional operator.
2523 * src/abg-dwarf-reader.cc (build_reference_type): Ditto.
2524 * src/abg-reader.cc (read_static): Ditto.
2525 (read_is_artificial): Ditto. (build_function_parameter):
2526 Ditto. (build_function_decl): Ditto.
2527 (build_qualified_type_decl): Ditto.
2528 (build_reference_type_def): Ditto.
2529 Reviewed-by: Matthias Maennich <maennich@google.com>
2530
25312020-05-01 Giuliano Procida <gprocida@google.com>
2532
2533 Remove stray semicolons.
2534 * include/abg-diff-utils.h (display_edit_script): Remove
2535 redundant semicolon.
2536 * include/abg-fwd.h (lookup_basic_type): Ditto.
2537 * src/abg-comparison.cc (mark_diff_as_visited):
2538 Ditto. (array_diff::has_local_changes): Ditto.
2539 (class_diff::ensure_lookup_tables_populated): Ditto.
2540 * src/abg-corpus.cc
2541 (corpus::priv::build_unreferenced_symbols_tables): Ditto.
2542 * src/abg-default-reporter.cc (default_reporter::report):
2543 Ditto.
2544 * src/abg-dwarf-reader.cc (finish_member_function_reading):
2545 Ditto.
2546 * src/abg-ir.cc (is_compatible_with_class_type): Ditto.
2547 (enum_type_decl::enumerator::set_name): Ditto.
2548 * src/abg-reader.cc (read_corpus_from_input): Ditto.
2549 (build_function_type): Ditto.
2550 * src/abg-suppression.cc (type_suppression::suppresses_type):
2551 Ditto.
2552 Reviewed-by: Matthias Maennich <maennich@google.com>
2553
25542020-05-01 Giuliano Procida <gprocida@google.com>
2555
2556 Remove excess whitespace.
2557 * src/abg-suppression.cc: Eliminate double blank lines.
2558 (read_parameter_spec_from_string): Eliminate space between
2559 ++ operator and its operand.
2560 Reviewed-by: Matthias Maennich <maennich@google.com>
2561
25622020-01-12 Matthias Maennich <maennich@google.com>
2563
2564 corpus/writer: sort emitted translation units by path name
2565 * include/abg-fwd.h: remove translation_units fwd declaration.
2566 * include/abg-ir.h (struct shared_translation_unit_comparator):
2567 Define new class.
2568 (translation_units): Define new typedef.
2569 * src/abg-corpus.cc (corpus::add): do checked insert into the
2570 translation_units set (rather than vector::push_back)
2571 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust test data.
2572 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
2573 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
2574 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
2575 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
2576 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
2577 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
2578 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2579
25802020-04-29 Matthias Maennich <maennich@google.com>
2581
2582 tests: reorder test execution to optimize 'make check' runtime
2583 * tests/Makefile.am(TESTS): split up in expensive and non
2584 expensive tests, sort the expensive ones by runime, the cheap
2585 ones alphabetically
2586
25872020-04-29 Matthias Maennich <maennich@google.com>
2588
2589 test-types-stability: parallelize test case alternatives
2590 * tests/test-types-stability.cc (test_task): add field no_default_sizes
2591 (test_task::perform) Switch on the new flag to test a different
2592 behaviour.
2593 (main): Schedule an additional test case to test with the new flag.
2594 Cc: Mark Wielaard <mark@klomp.org>
2595
25962020-05-04 Dodji Seketeli <dodji@redhat.com>
2597
2598 Fix compilation with g++ 4.8.5 on el7
2599 * include/abg-libxml-utils.h (build_sptr<xmlTextReader>): Wrap
2600 this specialization in the namespace sptr_utils and do away with
2601 the sptr_utils qualifier.
2602 * include/abg-regex.h (build_sptr<regex_t>): Likewise.
2603
26042020-04-24 Giuliano Procida <gprocida@google.com>
2605
2606 Simplify generation of symbol whitelist regex.
2607 * include/abg-regex.h (generate_from_strings): Declare new
2608 function to build a regex from some strings, representing a
2609 membership test.
2610 * src/abg-regex.cc (generate_from_strings): Implement new
2611 function to build a regex from some strings, representing a
2612 membership test, in a straightfoward fashion.
2613 * src/abg-tools-utils.cc
2614 (gen_suppr_spec_from_kernel_abi_whitelists): Replace
2615 regex-building code with a call to generate_from_strings.
2616 * tests/test-kmi-whitelist.cc: Update regexes in test.
2617
26182020-04-24 Giuliano Procida <gprocida@google.com>
2619
2620 Move libxml bits out of abg-sptr-utils.h.
2621 * include/abg-sptr-utils.h: Remove reader_sptr and
2622 xml_char_sptr typedefs, from namespace
2623 sptr_utils. (build_sptr): Remove corresponding template
2624 function specialisations for these types.
2625 * include/abg-libxml-utils.h: Add reader_sptr and
2626 xml_char_sptr typedefs, to namespace xml. (build_sptr): Add
2627 corresponding template function specialisations for these
2628 types.
2629
26302020-04-24 Giuliano Procida <gprocida@google.com>
2631
2632 Move regex definitions to own files.
2633 * include/Makefile.am: Add abg-regex.h.
2634 * src/Makefile.am: Remove abg-sptr-utils.h, add abg-regex.cc
2635 * include/abg-sptr-utils.h (regex_t_sptr): Remove this
2636 typedef, from namespace abigail::sptr_utils.
2637 (regex_t_deleter): Remove this struct, from namespace
2638 abigail::sptr_utils. (build_sptr): Remove these template
2639 specialisations, in duplicate, for regex_t_sptr.
2640 * include/abg-regex.h: New file, introduces namespace
2641 abigail::regex. (regex_t_sptr): Add this typedef, to namespace
2642 abigail::regex. (regex_t_deleter): Add this struct, to
2643 namespace abigail::regex. (build_sptr): Add these template
2644 specialisations for regex_t_sptr
2645 * src/abg-sptr-utils.cc: Remove this file.
2646 * src/abg-regex.cc: Add new file with contents effectively
2647 the same as abg-sptr-utils.cc.
2648 * src/abg-corpus-priv.h: Update regex_t_sptr namespace
2649 qualification.
2650 * src/abg-corpus.cc: Ditto.
2651 * src/abg-suppression-priv.h: Ditto.
2652 * src/abg-suppression.cc: Ditto.
2653
26542020-04-27 Mark Wielaard <mark@klomp.org>
2655
2656 Add --no-write-default-sizes option.
2657 * doc/manuals/abidw.rst: Document --no-write-default-sizes.
2658 * include/abg-writer.h (set_write_default_sizes): New function
2659 declaration.
2660 (set_common_options): Call set_write_default_sizes.
2661 * src/abg-reader.cc (build_function_decl): Get default size.
2662 (build_pointer_type_def): Likewise.
2663 (build_reference_type_def): Likewise.
2664 (build_function_type): Likewise.
2665 * src/abg-writer.cc (write_context): Add m_write_default_sizes
2666 bool.
2667 (get_write_default_sizes): New method.
2668 (set_write_default_sizes): Likewise.
2669 (write_size_and_alignment): Add default size and alignment
2670 parameters.
2671 (set_write_default_sizes): New function.
2672 (write_type_decl): Set default size and alignment.
2673 (write_pointer_type_def): Likewise.
2674 (write_reference_type_def): Likewise.
2675 (write_function_decl): Likewise.
2676 (write_function_type): Likewise.
2677 (write_class_decl_opening_tag): Likewise.
2678 (write_union_decl_opening_tag): Likewise.
2679 * tests/test-types-stability.cc (perform): Also test --abidiff
2680 with --no-write-default-sizes.
2681 * tools/abidw.cc (option): Add default_sizes bool.
2682 (parse_command_line): Parse --no-write-default-sizes.
2683 (display_usage): Add doc string for --no-write-default-sizes.
2684
26852020-04-26 Mark Wielaard <mark@klomp.org>
2686
2687 Rename read_elf_symbol_binding to read_elf_symbol_visibility.
2688 * src/abg-reader.cc (read_elf_symbol_binding): Renamed to...
2689 (read_elf_symbol_visibility): ...this.
2690
26912020-04-22 Giuliano Procida <gprocida@google.com>
2692
2693 abidiff: Omit declaration-only type size 0 diffs.
2694 * src/abg-reporter-priv.cc (report_size_and_alignment_changes):
2695 Filter out declaration-only / defined type size changes
2696 unconditionally.
2697 * tests/data/test-abidiff-exit/test-decl-struct-report.txt:
2698 Update test.
2699
27002020-04-22 Giuliano Procida <gprocida@google.com>
2701
2702 abidiff: Blank line after declaration-only diff.
2703 * src/abg-default-reporter.cc (default_reporter::report): In
2704 the class_or_union_diff overload, emit a new line at the end
2705 of the declaration-only reporting path.
2706 * tests/data/test-abidiff-exit/test-decl-struct-report.txt:
2707 Add missing blank lines.
2708
27092020-04-22 Giuliano Procida <gprocida@google.com>
2710
2711 Add tests for declaration-only struct diffs.
2712 * tests/data/Makefile.am: Add new test case files.
2713 * tests/data/test-abidiff-exit/test-decl-struct-report.txt:
2714 New test case generating "declaration-only" output.
2715 * tests/data/test-abidiff-exit/test-decl-struct-v0.c: Ditto.
2716 * tests/data/test-abidiff-exit/test-decl-struct-v0.o: Ditto.
2717 * tests/data/test-abidiff-exit/test-decl-struct-v1.c: Ditto.
2718 * tests/data/test-abidiff-exit/test-decl-struct-v1.o: Ditto.
2719 * tests/test-abidiff-exit.cc: Run new test case.
2720
27212020-04-24 Mark Wielaard <mark@klomp.org>
2722
2723 Add --no-elf-needed option to drop DT_NEEDED list from corpus.
2724 * doc/manuals/abidw.rst: Document --no-elf-needed.
2725 * include/abg-writer.h (set_write_elf_needed): New function.
2726 (set_common_options): Call it.
2727 * src/abg-writer.cc (write_context::m_write_elf_needed): New data
2728 member.
2729 (write_context::{g,s}et_write_elf_needed): Add new accessors.
2730 (set_write_elf_needed): New function.
2731 (write_context::write_corpus): Check write_elf_needed.
2732 * tools/abidw.cc (options): Add write_elf_needed bool.
2733 (display_usage): Describe --no-elf-needed.
2734 (parse_command_line): Parse --no-elf-needed.
2735
27362020-04-21 Mark Wielaard <mark@klomp.org>
2737
2738 Add no-parameter-names to drop function parameter names.
2739 * doc/manuals/abidw.rst: Add documentation for --no-parameter-names.
2740 * include/abg-writer.h (set_write_parameter_names): New function.
2741 (set_write_parameter_names): Call it.
2742 * src/abg-writer.cc (write_context): Add m_write_parameter_names
2743 bool, get_write_parameter_names and set_write_parameter_names
2744 functions.
2745 (write_context::write_function_decl): Check write_parameter_names.
2746 * tools/abidw.cc (options): Add write_parameter_names.
2747 (display_usage): Describe --no-parameter-names.
2748 (parse_command_line): Parse --no-parameter-names.
2749
27502020-04-24 Dodji Seketeli <dodji@redhat.com>
2751
2752 abipkgdiff: Fix race condition while using private types suppr specs
2753 * tools/abipkgdiff.cc (compare_args::private_types_suppr{1,2}):
2754 Make these data member *not* be a reference anymore.
2755 (maybe_create_private_types_suppressions): Rename this into ...
2756 (create_private_types_suppressions): ... this. Also, make this
2757 function return a copy of the vector of suppression specifications
2758 for private types created.
2759 (compare_prepared_userspace_packages): Use the new
2760 create_private_types_suppressions to create a copy of private
2761 types suppression specifications, rather than sharing it from
2762 package::private_types_suppressions_.
2763 (extract_package_and_map_its_content): Adjust to avoid creating
2764 the shared suppression specifications for private types.
2765 (package::private_types_suppressions_): Remove this data member
2766 that was holding the shared suppressions for private types.
2767 (package::private_types_suppressions): Remove these accessors.
2768
27692020-04-22 Giuliano Procida <gprocida@google.com>
2770
2771 test24-soname-suppr*txt: Fix suppression syntax.
2772 * tests/data/test-diff-suppr/test24-soname-suppr-0.txt: Fix
2773 typo, change "reached_through" to "accessed_through".
2774 * tests/data/test-diff-suppr/test24-soname-suppr-1.txt: Ditto.
2775 * tests/data/test-diff-suppr/test24-soname-suppr-2.txt: Ditto.
2776 * tests/data/test-diff-suppr/test24-soname-suppr-3.txt: Ditto.
2777 * tests/data/test-diff-suppr/test24-soname-suppr-4.txt: Ditto.
2778
27792020-04-20 Giuliano Procida <gprocida@google.com>
2780
2781 test35-leaf.suppr: fix regex typo.
2782 * tests/data/test-diff-suppr/test35-leaf.suppr: Fix typo in
2783 regex, "*." -> ".*".
2784
27852020-04-21 Matthias Maennich <maennich@google.com>
2786
2787 abg-elf-helpers: migrate maybe_adjust_et_rel_sym_addr_to_abs_addr
2788 * src/abg-dwarf-reader.cc
2789 (maybe_adjust_et_rel_sym_addr_to_abs_addr)
2790 (drop the wrapped overload completely): Move out functions.
2791 * src/abg-elf-helpers.cc
2792 (maybe_adjust_et_rel_sym_addr_to_abs_addr): New function.
2793 * src/abg-elf-helpers.h
2794 (maybe_adjust_et_rel_sym_addr_to_abs_addr): New function
2795 declaration.
2796 Reviewed-by: Giuliano Procida <gprocida@google.com>
2797
27982020-04-21 Matthias Maennich <maennich@google.com>
2799
2800 abg-elf-helpers: migrate more elf helpers (architecture specific helpers)
2801 * src/abg-dwarf-reader.cc (elf_architecture_is_ppc64): Move
2802 function out and adjust callers to call the migrated
2803 functions.
2804 (elf_architecture_is_big_endian): Likewise.
2805 (architecture_word_size): Likewise.
2806 (current_elf_file_is_executable): Likewise.
2807 (current_elf_file_is_dso): Likewise.
2808 * src/abg-elf-helpers.cc (architecture_is_ppc64): Add new function.
2809 (architecture_is_big_endian): Likewise.
2810 (get_architecture_word_size): Likewise.
2811 (is_executable): Likewise.
2812 (is_dso): Likewise.
2813 * src/abg-elf-helpers.h (architecture_is_ppc64): Add new declaration.
2814 (architecture_is_big_endian): Likewise.
2815 (get_architecture_word_size): Likewise.
2816 (is_executable): Likewise.
2817 (is_dso): Likewise.
2818 Reviewed-by: Giuliano Procida <gprocida@google.com>
2819
28202020-04-21 Matthias Maennich <maennich@google.com>
2821
2822 abg-dwarf-reader: migrate more ELF helpers to elf-helpers
2823 * src/abg-dwarf-reader.cc (read_context::{opd_section_,
2824 ksymtab_section_, ksymtab_reloc_section_, ksymtab_gpl_section_,
2825 ksymtab_gpl_reloc_section_, ksymtab_strings_section_}): Make these
2826 data members mutable as they are set by their getter member
2827 functions, as an implementation detail.
2828 (read_context::find_symbol_table_section):
2829 adjust to new interface of elf_helpers::find_symbol_table_section.
2830 (find_opd_section): use elf_helpers::find_opd_section for lookup.
2831 (find_ksymtab_section): use elf_helpers::find_ksymtab_section.
2832 (find_ksymtab_gpl_section): use elf_helpers::find_ksymtab_gpl_section.
2833 (find_relocation_section): Move out function.
2834 (get_binary_load_address): Move out function.
2835 (find_ksymtab_reloc_section): use elf_helpers::find_relocation_section
2836 (find_ksymtab_gpl_reloc_section): use
2837 elf_helpers::find_relocation_section
2838 * src/elf-helpers.cc (find_symbol_table_section): change
2839 interface to match other find_*_section functions.
2840 (find_symbol_table_section_index): Adjust for the new interface of
2841 find_symbol_table_section.
2842 (find_opd_section): New function.
2843 (find_ksymtab_section): New function.
2844 (find_ksymtab_gpl_section): New function.
2845 (find_relocation_section): New function.
2846 (get_binary_load_address): New function.
2847 * src/elf-helpers.h (find_symbol_table_section): Change declaration.
2848 (find_opd_section): New function declaration.
2849 (find_ksymtab_section): New function declaration.
2850 (find_ksymtab_gpl_section): New function declaration.
2851 (find_relocation_section): New function declaration.
2852 (get_binary_load_address): New function declaration.
2853
28542020-04-21 Matthias Maennich <maennich@google.com>
2855
2856 abg-elf-helpers: consolidate the is_linux_kernel* helpers
2857 * src/abg-dwarf-reader.cc
2858 (read_context::function_symbol_is_exported): use is_linux_kernel
2859 from elf_helpers.
2860 (read_context::variable_is_exported): Likewise.
2861 (read_context::get_symtab_format): Likewise.
2862 (read_context::load_symbol_maps): Likewise.
2863 (read_debug_info_into_corpus): Likewise.
2864 (read_context::is_linux_kernel_binary): Drop function.
2865 (read_context::is_linux_kernel_module): Drop function.
2866 * src/abg-elf-helpers.cc (binary_is_linux_kernel): rename to
2867 is_linux_kernel
2868 (binary_is_linux_kernel_module): rename to is_linux_kernel_module
2869 (find_ksymtab_strings_section): Adjust to function renames.
2870 * src/abg-elf-helpers.h (binary_is_linux_kernel): rename to
2871 is_linux_kernel
2872 (binary_is_linux_kernel_module): rename to is_linux_kernel_module
2873 Reviewed-by: Giuliano Procida <gprocida@google.com>
2874
28752020-04-21 Matthias Maennich <maennich@google.com>
2876
2877 abg-elf-helpers: move some kernel helpers from abg-dwarf-reader
2878 * abg-dwarf-reader.cc (binary_is_linux_kernel): Move function out.
2879 (binary_is_linux_kernel_module): Likewise.
2880 (find_ksymtab_strings_section): Likewise.
2881 * abg-elf-helpers.cc (binary_is_linux_kernel): Move function in.
2882 (binary_is_linux_kernel_module): Likewise.
2883 (find_ksymtab_strings_section): Likewise.
2884 * abg-elf-helpers.h (binary_is_linux_kernel): Add declaration.
2885 (binary_is_linux_kernel_module): Likewise.
2886 (find_ksymtab_strings_section): Likewise.
2887 Reviewed-by: Giuliano Procida <gprocida@google.com>
2888
28892020-04-21 Matthias Maennich <maennich@google.com>
2890
2891 abg-elf-helpers: move some versioning helpers from abg-dwarf-reader
2892 * abg-dwarf-reader.cc (get_symbol_versionning_sections): Move function out.
2893 (get_version_definition_for_versym): Likewise.
2894 (get_version_needed_for_versym): Likewise.
2895 (get_version_for_symbol): Likewise.
2896 * abg-elf-helpers.cc (get_symbol_versionning_sections): Move function in.
2897 (get_version_definition_for_versym): Likewise.
2898 (get_version_needed_for_versym): Likewise.
2899 (get_version_for_symbol): Likewise.
2900 * abg-elf-helpers.h (get_symbol_versionning_sections): Add declaration.
2901 (get_version_definition_for_versym): Likewise.
2902 (get_version_needed_for_versym): Likewise.
2903 (get_version_for_symbol): Likewise.
2904 Reviewed-by: Giuliano Procida <gprocida@google.com>
2905
29062020-04-21 Matthias Maennich <maennich@google.com>
2907
2908 abg-elf-helpers: move some elf helpers from abg-dwarf-reader
2909 * abg-dwarf-reader.cc (stt_to_elf_symbol_type): Move function out.
2910 (stb_to_elf_symbol_binding): Likewise.
2911 (stv_to_elf_symbol_visibility): Likewise.
2912 (e_machine_to_string): Likewise.
2913 (find_section): Likewise.
2914 (find_symbol_table_section): Likewise.
2915 (find_symbol_table_section_index): Likewise.
2916 (enum hash_table_kind): Likewise.
2917 (find_hash_table_section_index): Likewise.
2918 (get_symbol_versionning_sections): Likewise.
2919 (find_text_section): Likewise.
2920 (find_bss_section): Likewise.
2921 (find_rodata_section): Likewise.
2922 (find_data_section): Likewise.
2923 (find_data1_section): Likewise.
2924 * abg-elf-helpers.cc (stt_to_elf_symbol_type): Move function in.
2925 (stb_to_elf_symbol_binding): Likewise.
2926 (stv_to_elf_symbol_visibility): Likewise.
2927 (e_machine_to_string): Likewise.
2928 (find_section): Likewise.
2929 (find_symbol_table_section): Likewise.
2930 (find_symbol_table_section_index): Likewise.
2931 (enum hash_table_kind): Likewise.
2932 (find_hash_table_section_index): Likewise.
2933 (get_symbol_versionning_sections): Likewise.
2934 (find_text_section): Likewise.
2935 (find_bss_section): Likewise.
2936 (find_rodata_section): Likewise.
2937 (find_data_section): Likewise.
2938 (find_data1_section): Likewise.
2939 * abg-elf-helpers.h (stt_to_elf_symbol_type): Add declaration.
2940 (stb_to_elf_symbol_binding): Likewise.
2941 (stv_to_elf_symbol_visibility): Likewise.
2942 (e_machine_to_string): Likewise.
2943 (find_section): Likewise.
2944 (find_symbol_table_section): Likewise.
2945 (find_symbol_table_section_index): Likewise.
2946 (enum hash_table_kind): Likewise.
2947 (find_hash_table_section_index): Likewise.
2948 (get_symbol_versionning_sections): Likewise.
2949 (find_text_section): Likewise.
2950 (find_bss_section): Likewise.
2951 (find_rodata_section): Likewise.
2952 (find_data_section): Likewise.
2953 (find_data1_section): Likewise.
2954 Reviewed-by: Giuliano Procida <gprocida@google.com>
2955
29562020-04-21 Matthias Maennich <maennich@google.com>
2957
2958 abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case
2959 * src/Makefile.am: Add new source files abg-elf-helpers.{h,cc}.
2960 * src/abg-elf-helpers.cc: New source file.
2961 * src/abg-elf-helpers.h: New header file.
2962 * tests/.gitignore: Exclude runtestelfhelpers from being committed.
2963 * tests/Makefile.am: Add new test case runtestelfhelpers.
2964 * tests/test-elf-helpers.cc: New test source file.
2965 Reviewed-by: Giuliano Procida <gprocida@google.com>
2966
29672020-04-20 Matthias Maennich <maennich@google.com>
2968
2969 tests: parallelize diff-suppr test
2970 * tests/test-diff-suppr.cc(main): parallelize test execution.
2971 (test_task) new abigail::workers::task implementation to run
2972 test cases in this test as separate worker tasks.
2973
29742020-04-20 Matthias Maennich <maennich@google.com>
2975
2976 abg-dwarf-reader: simplify symbol map update
2977 * src/abg-dwarf-reader.cc
2978 (read_context::load_symbol_maps_from_symtab_section): simplify
2979 symbol map update for fun_syms_, undefined_fun_syms_, var_syms_,
2980 undefined_var_syms_.
2981
29822020-04-20 Matthias Maennich <maennich@google.com>
2983
2984 make: add distcheck-fast target
2985 * Makefile.am: add distcheck-fast make target
2986
29872020-04-14 Giuliano Procida <gprocida@google.com>
2988
2989 Fix variable suppression name_not_regex.
2990 * src/abg-suppression-priv.h: In get_symbol_name_not_regex
2991 method of variable_suppression::priv, fix typo causing
2992 miscompilation of regex.
2993
29942020-04-13 Mark Wielaard <mark@klomp.org>
2995
2996 Add --drop-undefined-syms to abidw.
2997 * include/abg-dwarf-reader.h (set_drop_undefined_syms):
2998 New declaration.
2999 * src/abg-dwarf-reader.cc (class read_context): Add private
3000 bool drop_undefined_syms_.
3001 (drop_undefined_syms): New getter and setter method.
3002 (set_drop_undefined_syms): New function.
3003 (function_is_suppressed): Check drop_undefined_syms on
3004 read_context.
3005 (variable_is_suppressed): Likewise.
3006 * src/abg-reader.cc (read_context): Add private bool
3007 m_drop_undefined_syms.
3008 (drop_undefined_syms): New getter and setter method.
3009 * tools/abidw.cc (struct options): Add drop_undefined_syms.
3010 (display_usage): Print --drop-undefined-syms.
3011 (parse_command_line): Parse --drop-undefined-syms.
3012 (main): Call set_drop_undefined_syms.
3013
30142020-04-12 Mark Wielaard <mark@klomp.org>
3015
3016 Add --drop-private-types to abidw.
3017 * tools/abidw.cc (options): Add drop_private_types bool.
3018 (display_usage): Add --drop-private-types.
3019 (parse_command_line): Parse --drop-private-types, set opts.
3020 (set_suppressions): Call set_drops_artifact_from_ir when
3021 drop_private_types set.
3022 * doc/manuals/abidw.rst: Document --drop-private-types.
3023
30242020-04-12 Mark Wielaard <mark@klomp.org>
3025
3026 Add --header-file option to add individual public header files.
3027 * include/abg-tools-utils.h (gen_suppr_spec_from_headers): Add
3028 hdr_files string vector argument.
3029 * src/abg-tools-utils.cc (handle_file_entry): New function that
3030 adds one specific file to the type_suppression. Implementation
3031 lifted from...
3032 (handle_fts_entry): ...here. Call handle_file_entry for each file.
3033 (gen_suppr_spec_from_headers): Also takes a header_files string
3034 vector as argument. Call handle_file_entry for each file entry.
3035 * tools/abidiff.cc (options): Add header_files1 and header_files2
3036 string vectors.
3037 (display_usage): Print --header-file1 and --header-file2 usage.
3038 (parse_command_line): Handle --header-file1, --hf1 and
3039 --header-file2, --hf2.
3040 (set_diff_context_from_opts): Call gen_suppr_spec_from_headers
3041 with header_files1 and header_files2.
3042 (set_suppressions): Likewise.
3043 * tools/abidw.cc (options): Add header_files string vector.
3044 (display_usage): Print --header-file usage.
3045 (parse_command_line): Handle --header-file1, --hf1.
3046 (maybe_check_header_files): New function.
3047 (set_suppressions): Call gen_suppr_spec_from_headers with
3048 header_files.
3049 (main): Call maybe_check_header_files.
3050 * tools/abilint.cc (options): Add header_files string vector.
3051 (display_usage): Print --header-file usage.
3052 (parse_command_line): Handle --header-file1, --hf1.
3053 (set_suppressions): Call gen_suppr_spec_from_headers with
3054 header_files.
3055 * doc/manuals/abidiff.rst: Document --header-file1, --hf1 and
3056 --header-file2, --hf2. Add new options to documentation of
3057 --drop-private-types.
3058 * doc/manuals/abidw.rst: Document --header-file, --hf.
3059 * doc/manuals/abilint.rst: Likewise.
3060
30612020-04-08 Giuliano Procida <gprocida@google.com>
3062
3063 abidiff: Document and refresh tests.
3064 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.cc:
3065 Comment test. Reorder members of ops to get better coverage.
3066 * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc:
3067 Comment test.
3068 * tests/data/test-abidiff-exit/test-leaf-more-v1.cc: Ditto.
3069 * tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc:
3070 Comment test. Update comment on ops2.
3071 * tests/data/test-abidiff-exit/test-leaf-redundant-v1.c:
3072 Comment test.
3073 * tests/data/test-abidiff-exit/test-leaf-stats-v1.cc: Ditto.
3074 * tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt:
3075 Update locations. Update report to reflect deletion,
3076 insertion and changed members (was previously changed only).:
3077 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3078 Update locations.
3079 * tests/data/test-abidiff-exit/test-leaf-redundant-report.txt:
3080 Ditto.:
3081 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc:
3082 Added one line comment referring to -v1 source file.
3083 * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc: Ditto.
3084 * tests/data/test-abidiff-exit/test-leaf-more-v0.cc: Ditto.
3085 * tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc: Ditto.
3086 * tests/data/test-abidiff-exit/test-leaf-redundant-v0.c: Ditto.
3087 * tests/data/test-abidiff-exit/test-leaf-stats-v0.cc: Ditto.
3088 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.o: Recompiled.
3089 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.o: Ditto.
3090 * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.o: Ditto.
3091 * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.o: Ditto.
3092 * tests/data/test-abidiff-exit/test-leaf-more-v0.o: Ditto.
3093 * tests/data/test-abidiff-exit/test-leaf-more-v1.o: Ditto.
3094 * tests/data/test-abidiff-exit/test-leaf-peeling-v0.o: Ditto.
3095 * tests/data/test-abidiff-exit/test-leaf-peeling-v1.o: Ditto.
3096 * tests/data/test-abidiff-exit/test-leaf-redundant-v0.o: Ditto.
3097 * tests/data/test-abidiff-exit/test-leaf-redundant-v1.o: Ditto.
3098 * tests/data/test-abidiff-exit/test-leaf-stats-v0.o: Ditto.
3099 * tests/data/test-abidiff-exit/test-leaf-stats-v1.o: Ditto.
3100
31012020-04-14 Giuliano Procida <gprocida@google.com>
3102
3103 abg-reporter-priv.cc: Improve readability of represent helper function.
3104 * src/abg-reporter-priv.cc (represent): In the var_diff_sptr
3105 overload, rename pretty_representation to o_pretty_representation,
3106 introduce n_pretty_representation where needed and replace the
3107 duplicate tr1 and tr2 with these; rename all other variables foo1
3108 and foo2 to o_foo and n_foo respectively, using _type instead of
3109 _t; introduce o_anon and n_anon and use them to make the local
3110 variable is_strict_anonymous_data_member_change const, make
3111 ABG_ASSERT in anonymous data member handling more obvious in the
3112 case where anonymity has changed and allow simplification of
3113 formatting in this case; move declarations of const local
3114 variables above those of the non-const, state-tracking, variables.
3115
31162020-04-07 Giuliano Procida <gprocida@google.com>
3117
3118 abg-reporter-priv.cc: Fix anonymous member size change reports.
3119 * src/abg-reporter-priv.cc (represent): In the var_diff_sptr
3120 overload, factor out some expressions as local variables, rely
3121 on diff_to_be_reported to decide whether to emit a change,
3122 fold together local/non-local change reporting using
3123 local_changes to preserve current name formatting differences,
3124 keep track explicitly of whether size information has been
3125 emitted and ensure it happens if needed, make offset and size
3126 change reporting for anonymous data members more meaningful.
3127 * tests/test-abidiff-exit.cc: Run new test cases.
3128 * tests/data/Makefile.am: Add new test files.
3129 * tests/data/test-abidiff-exit/test-member-size-v0.cc: New
3130 test.
3131 * tests/data/test-abidiff-exit/test-member-size-v0.o: Ditto.
3132 * tests/data/test-abidiff-exit/test-member-size-v1.cc: Ditto.
3133 * tests/data/test-abidiff-exit/test-member-size-v1.o: Ditto.
3134 * tests/data/test-abidiff-exit/test-member-size-report0.txt:
3135 New test, default mode.
3136 * tests/data/test-abidiff-exit/test-member-size-report1.txt:
3137 New test, --leaf-changes-only mode.
3138 * tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt:
3139 Eliminate duplicate reporting of member sizes.
3140 * tests/data/test-abidiff-exit/test-leaf-more-report.txt: Ditto.
3141 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3142 Ditto.
3143 * tests/data/test-abidiff-exit/test-no-stray-comma-report.txt:
3144 Ditto.
3145 * tests/data/test-diff-dwarf/test45-anon-dm-change-report-0.txt:
3146 Add size report for anonymous data member.
3147 * tests/data/test-diff-filter/test44-anonymous-data-member-report-0.txt:
3148 Ditto.
3149 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt:
3150 Add missing size change report.
3151 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Remove
3152 size change report for previously reported type.
3153 * tests/data/test-diff-suppr/test46-PR25128-report-1.txt:
3154 Eliminate duplicate reporting of member size change.
3155 * tests/data/test-diff-suppr/test46-PR25128-report-2.txt:
3156 Ditto.
3157
31582020-04-07 Giuliano Procida <gprocida@google.com>
3159
3160 abidiff: More compact references to prior diffs.
3161 * src/abg-reporter-priv.cc (represent): In the var_diff_sptr
3162 overload, use consistent punctuation and keep to a single line
3163 of output when referring back to an existing type diff report.
3164 Remove unnecessary braces around single line conditional
3165 blocks.
3166 * src/abg-reporter-priv.h: In the macro
3167 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER, use
3168 consistent punctuation when referring back to an existing type
3169 diff report.
3170 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust
3171 formatting of back references to existing type diff reports.
3172 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
3173 Ditto.
3174 * tests/data/test-diff-filter/test16-report-2.txt: Ditto.
3175 * tests/data/test-diff-filter/test17-1-report.txt: Ditto.
3176 * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt:
3177 Ditto.
3178 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
3179 Ditto.
3180 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Ditto.
3181
31822020-04-06 Giuliano Procida <gprocida@google.com>
3183
3184 test-abidiff-exit.cc: Drop redundant --redundant.
3185 * tests/test-abidiff-exit.cc: Drop obsolete --redundant flag
3186 and comment as --redundant is now implied by
3187 --leaf-changes-only.
3188
31892020-04-06 Giuliano Procida <gprocida@google.com>
3190
3191 Rename test-abidiff-exit/test-leaf[0-3] files.
3192 * tests/data/Makefile.am: Rename test files.
3193 * tests/test-abidiff-exit.cc: Rename test files.
3194 * tests/data/test-abidiff-exit/test-leaf-fun-type-report.txt:
3195 Renamed from test-leaf2-report.txt.
3196 * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc:
3197 Renamed from test-leaf2-v0.cc.
3198 * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.o:
3199 Renamed from test-leaf2-v0.o.
3200 * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc:
3201 Renamed from test-leaf2-v1.cc.
3202 * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.o:
3203 Renamed from test-leaf2-v1.o.
3204 * tests/data/test-abidiff-exit/test-leaf-more-report.txt:
3205 Renamed from test-leaf1-report.txt.
3206 * tests/data/test-abidiff-exit/test-leaf-more-v0.cc: Renamed
3207 from test-leaf1-v0.cc.
3208 * tests/data/test-abidiff-exit/test-leaf-more-v0.o: Renamed
3209 from test-leaf1-v0.o.
3210 * tests/data/test-abidiff-exit/test-leaf-more-v1.cc: Renamed
3211 from test-leaf1-v1.cc.
3212 * tests/data/test-abidiff-exit/test-leaf-more-v1.o: Renamed
3213 from test-leaf1-v1.o.
3214 * tests/data/test-abidiff-exit/test-leaf-redundant-report.txt:
3215 Renamed from test-leaf3-report.txt.
3216 * tests/data/test-abidiff-exit/test-leaf-redundant-v0.c:
3217 Renamed from test-leaf3-v0.c.
3218 * tests/data/test-abidiff-exit/test-leaf-redundant-v0.o:
3219 Renamed from test-leaf3-v0.o.
3220 * tests/data/test-abidiff-exit/test-leaf-redundant-v1.c:
3221 Renamed from test-leaf3-v1.c.
3222 * tests/data/test-abidiff-exit/test-leaf-redundant-v1.o:
3223 Renamed from test-leaf3-v1.o.
3224 * tests/data/test-abidiff-exit/test-leaf-stats-report.txt:
3225 Renamed from test-leaf0-report.txt.
3226 * tests/data/test-abidiff-exit/test-leaf-stats-v0.cc: Renamed
3227 from test-leaf0-v0.cc.
3228 * tests/data/test-abidiff-exit/test-leaf-stats-v0.o: Renamed
3229 from test-leaf0-v0.o.
3230 * tests/data/test-abidiff-exit/test-leaf-stats-v1.cc: Renamed
3231 from test-leaf0-v1.cc.
3232 * tests/data/test-abidiff-exit/test-leaf-stats-v1.o: Renamed
3233 from test-leaf0-v1.o.
3234
32352020-04-07 Dodji Seketeli <dodji@redhat.com>
3236
3237 Update the mailing list registration form on the web page
3238 * doc/website/mainpage.txt: Use the form at
3239 https://sourceware.org/mailman/listinfo/libabigail to register to
3240 the mailing list.
3241
32422020-03-30 Giuliano Procida <gprocida@google.com>
3243
3244 abg-dwarf-reader.cc: Avoid division by zero.
3245 * src/abg-dwarf-reader.cc (perform_late_type_canonicalizing):
3246 If total is zero, don't try to output percentages using it as
3247 a divisor.
3248
32492020-03-29 Giuliano Procida <gprocida@google.com>
3250
3251 abidiffpkg: Remove stray test report file.
3252 * tests/data/Makefile.am: Removed
3253 tests/data/test-diff-pkg/dirpkg-2-report-1.txt.
3254 * tests/data/test-diff-pkg/dirpkg-2-report-1.txt: Removed.
3255
32562020-03-29 Giuliano Procida <gprocida@google.com>
3257
3258 test-diff-suppr.cc: Add missing tests.
3259 * tests/test-diff-suppr.cc: Add stanzas for
3260 test6-fn-suppr-report-4, test16-suppr-removed-fn-report-5 and
3261 test22-suppr-removed-var-sym-report-5 and
3262 test23-alias-filter-report-4 tests.
3263 * tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt:
3264 Number parameters from 1 and update expected output to current
3265 formatting.
3266 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt:
3267 Update expected output to current formatting.
3268 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
3269 Update expected output to current formatting.
3270
32712020-03-29 Giuliano Procida <gprocida@google.com>
3272
3273 abidiff: Remove blank line after typedef changes.
3274 * include/abg-reporter.h
3275 (default_reporter::report_local_typedef_changes): Change
3276 return type to void.
3277 * src/abg-default-reporter.cc:
3278 (default_reporter::report_local_typedef_changes): Change
3279 return type to void, remove emit_nl state variable and logic.
3280 * tests/data/test-abidiff/test-PR18791-report0.txt: Remove
3281 blank lines.
3282 * tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt:
3283 Ditto.
3284 * tests/data/test-diff-suppr/test39-opaque-type-report-0.txt:
3285 Ditto.
3286
32872020-03-26 Giuliano Procida <gprocida@google.com>
3288
3289 Fix size calculations for multidimensional arrays.
3290 * include/abg-ir.h (array_type_def::append_subrange): Remove
3291 this function.
3292 * src/abg-ir.cc (array_type_def::set_element_type): Add a note
3293 about safe usage.
3294 (array_type_def::append_subrange): Inline this function into
3295 its only caller append_subranges and remove it.
3296 (array_type_def::append_subranges): Do correct multiplicative
3297 calculation of multidimensional array sizes.
3298 * src/abg-reader.cc (build_array_type_def): When checking
3299 calculated against read array sizes, warn once if value
3300 matches old behaviour rather than raising an assertion.
3301 Otherwise, before raising an assertion, emit an informative
3302 error message.
3303 * tests/data/test-annotate/test14-pr18893.so.abi: Correct
3304 array sizes.
3305 * tests/data/test-annotate/test17-pr19027.so.abi: Ditto.
3306 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3307 Ditto.
3308 * tests/data/test-annotate/test7.so.abi: Ditto.
3309 * tests/data/test-diff-dwarf/test10-report.txt: Ditto.
3310 * tests/data/test-diff-dwarf/test11-report.txt: Ditto.
3311 * tests/data/test-read-write/test25.xml: Ditto.
3312 Reviewed-by: Matthias Maennich <maennich@google.com>
3313
33142020-03-27 Giuliano Procida <gprocida@google.com>
3315
3316 abidiff: Remove new lines after parameter diffs.
3317 * src/abg-default-reporter.cc: (report_local_function_type_changes):
3318 Remove unnecessary blank lines after lists of parameter changes.
3319 * tests/data/test-*/test*report*.txt: Remove blank lines after
3320 parameter change lists in 12 files.
3321 Reviewed-by: Matthias Maennich <maennich@google.com>
3322
33232020-03-27 Giuliano Procida <gprocida@google.com>
3324
3325 abidiff: Eliminate leaf mode double blank lines.
3326 * src/abg-leaf-reporter.cc: (report_diffs) Emit 1 instead of 2
3327 new lines between sections.
3328 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3329 Replace double blank lines with single ones.
3330 * tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt:
3331 Ditto.
3332 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Ditto.
3333 * tests/data/test-*/test*report*.txt:: Ditto.
3334 Reviewed-by: Matthias Maennich <maennich@google.com>
3335
33362020-03-27 Giuliano Procida <gprocida@google.com>
3337
3338 abidiff: Fix variable declaration formatting.
3339 * src/abg-reporter-priv.cc: (represent) In the var_diff_sptr
3340 overload, make sure the state variables begin_with_and and
3341 emitted are updated consistently; add a TODO for one case
3342 which may result in the end of the function being reached
3343 without having emitted a report; add missing new lines
3344 following reporting of anonymous member changes; only emit a
3345 final new line if begin_with_and hasn't tracked one already;
3346 document state variables.
3347 * tests/data/test-diff-dwarf/test45-anon-dm-change-report-0.txt:
3348 Add missing blank line after anonymous member change text.
3349 * tests/data/test-diff-filter/test44-anonymous-data-member-report-1.txt:
3350 Add missing "and " continuation.
3351 Reviewed-by: Matthias Maennich <maennich@google.com>
3352
33532020-03-27 Giuliano Procida <gprocida@google.com>
3354
3355 abidiff: Remove member function diff blank lines.
3356 * src/abg-default-reporter.cc (report): In the
3357 class_or_union_diff overload, don't emit a new line after each
3358 list of member function, member type, template member
3359 function and template member class changes.
3360 * src/abg-leaf-reporter.cc (report): : In the
3361 class_or_union_diff overload, don't emit a new line after each
3362 list of member function changes.
3363 * tests/data/Makefile.am: Add new test case files.
3364 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc:
3365 New test case for --leaf-changes-only member function diffs.
3366 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.o:
3367 Ditto.
3368 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.cc:
3369 Ditto. Also add a TODO regarding a potentially bad diff.
3370 * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.o:
3371 Ditto.
3372 * tests/data/test-abidiff/test-struct1-report.txt: Remove
3373 blank lines after member function changes lists.
3374 * tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt:
3375 Ditto.
3376 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
3377 Ditto.
3378 * tests/test-abidiff-exit.cc: Add new test case.
3379 Reviewed-by: Matthias Maennich <maennich@google.com>
3380
33812020-03-26 Giuliano Procida <gprocida@google.com>
3382
3383 abidiff: Fix enum impacted interfaces blank line.
3384 * src/abg-default-reporter.cc (report): In the enum_diff
3385 overload, don't emit a blank line before a possible "impacted
3386 interfaces" stanza. In the class_or_union overload, change a
3387 stray conditional to use the emitted state variable for
3388 consistency.
3389 * tests/data/test*report*.txt: Remove blank lines after enum
3390 diffs in 17 files.
3391 Reviewed-by: Matthias Maennich <maennich@google.com>
3392
33932020-03-26 Giuliano Procida <gprocida@google.com>
3394
3395 abidiff: Remove blank line after base class diffs.
3396 * src/abg-default-reporter.cc (report): In the class_diff
3397 overload, eliminate the extra blank line after base class
3398 changes and remove unneeded new line logic.
3399 * tests/data/test*report*.txt: Remove blank lines after base
3400 class diffs in 9 files.
3401 Reviewed-by: Matthias Maennich <maennich@google.com>
3402
34032020-03-26 Giuliano Procida <gprocida@google.com>
3404
3405 abidiff: Clean up new lines between sections.
3406 * src/abg-default-reporter.cc (report): In the corpus_diff
3407 override, add back the extra blank line per changed function
3408 but remove the extra one after all changed changed functions
3409 and variables; comment these.
3410 * src/abg-leaf-reporter.cc (report): In the corpus_diff
3411 override, add back the extra blank line per changed function
3412 but remove the extra one after all changed changed functions
3413 and variables; comment these.
3414 * src/abg-reporter-priv.cc
3415 (maybe_report_unreachable_type_changes): Remove extra blank
3416 line emitted after all unreachable type changes; comment
3417 this.
3418 * tests/data/test*report*.txt: Remove/add blank lines.
3419 Reviewed-by: Matthias Maennich <maennich@google.com>
3420
34212020-03-26 Giuliano Procida <gprocida@google.com>
3422
3423 abg-ir.cc: Add types_have_similar_structure tests.
3424 * src/abg-ir.cc (types_have_similar_structure): Update TODO
3425 regarding structure of arrays - multidimensional arrays are
3426 the issue.
3427 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3428 Updated following changes.
3429 * tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc: Add
3430 more cases (see below).
3431 * tests/data/test-abidiff-exit/test-leaf-peeling-v0.o:
3432 Updated.
3433 * tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc: Add
3434 comment about a potential change to local-change semantics;
3435 add test cases to demonstrate that * and & and * and *** are
3436 structurally different; add a TODO regarding multidimensional
3437 arrays where changes are sometimes missed in leaf mode.
3438 * tests/data/test-abidiff-exit/test-leaf-peeling-v1.o
3439
34402020-03-28 Giuliano Procida <gprocida@google.com>
3441
3442 abg-reader.cc: Fix code indentation and tabify.
3443 * src/abg-reader.cc (build_elf_symbol_db): Fix code
3444 indentation.
3445 (build_array_type_def): Tabify.
3446
34472020-03-26 Dodji Seketeli <dodji@redhat.com>
3448
3449 Update tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
3450 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3451 Update output.
3452
34532020-03-25 Giuliano Procida <gprocida@google.com>
3454
3455 abidiff: Remove some more unnecessary blank lines.
3456 * src/abg-default-reporter.cc (report) In the
3457 class_or_union_diff overload, don't emit a new line after
3458 calls to represent. In the union_diff overload, emit a new
3459 line after a from/to change; fix indentation. In the
3460 corpus_diff overload, don't emit an extra new line after
3461 reporting a diff.
3462 * src/abg-leaf-reporter.cc (report_diffs) Don't emit a new
3463 line after reporting a canonical diff. In the
3464 class_or_union_diff overload, don't emit a new line after
3465 calls to represent. In the corpus_diff overload, don't emit an
3466 extra new line after reporting a diff.
3467 * src/abg-reporter-priv.cc (represent): Emit a final new line,
3468 but only if needed.
3469 (maybe_report_interfaces_impacted_by_diff): Emit a new line
3470 after the last impacted interface.
3471 * tests/data/test-*/*report*.txt: Remove blank lines (and add
3472 a missing one) to 77 test cases.
3473
34742020-03-25 Giuliano Procida <gprocida@google.com>
3475
3476 abg-ir.cc: Improve types_have_similar_structure.
3477 * include/abg-fwd.h (types_have_similar_structure): In both
3478 overloads, add an indirect_type argument, defaulting to
3479 false.
3480 * src/abg-ir.cc (reference_type_def constructor): Tabify.
3481 (types_have_similar_structure): In both overloads, add an
3482 indirect_type argument and update documentation text. In the
3483 type_base_sptr overload, pass indirect_type in the tail
3484 call. In the type_base* overload, replace was_indirect_type
3485 with indirect_type; peel CV qualifiers and typedefs without
3486 testing as the peel function does this; replace the
3487 indiscriminate peeling of qualifier/pointer/reference/array
3488 type components with code that checks the same
3489 pointer/reference/array type component is used on each side
3490 and makes recursive calls with indirect_type set to true; pass
3491 the indirect_type argument recursively when comparing other
3492 subtypes; move the typeid check earlier, document its purpose
3493 and remove unneccessary checks after later dynamic casts;
3494 remove an always-true conditional; add a TODO for comparing
3495 array types more accurately.
3496 * tests/data/Makefile.am: Add new test case files.
3497 * tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc: New
3498 test case.
3499 * tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc: Ditto.
3500 * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
3501 Ditto.
3502 * tests/test-abidiff-exit.cc: Run new test case.
3503
35042020-03-19 Giuliano Procida <gprocida@google.com>
3505
3506 abg-ir.cc: Remove always-true check.
3507 * src/abg-ir.cc (types_have_similar_structure): Remove
3508 identical nested conditional.
3509 (reference_type_def::reference_type_def): Tabify.
3510 Reviewed-by: Matthias Maennich <maennich@google.com>
3511
35122020-03-19 Giuliano Procida <gprocida@google.com>
3513
3514 abg-ir.cc: Fix peel_typedef_type(const type_base*).
3515 * src/abg-ir.cc (peel_typedef_type): In the const type_base*
3516 overload, return the original argument rather than null if the
3517 type isn't actually a typedef.
3518
35192020-03-18 Giuliano Procida <gprocida@google.com>
3520
3521 Eliminate redundancy in representation of local change kinds.
3522 * include/abg-ir.h (change_kind): Remove redundant
3523 LOCAL_CHANGE_KIND member, renumber members and update
3524 comments.
3525 * src/abg-comparison.cc (distinct_diff::has_local_changes):
3526 Remove redundant LOCAL_CHANGE_KIND.
3527 (var_diff::has_local_changes
3528 * src/abg-ir.cc (equals): In the type_base,
3529 qualified_type_def, pointer_type_def, reference_type_def,
3530 array_type_def::subrange_type, array_type_def, enum_type_decl,
3531 typedef_decl, var_decl, function_type, function_decl,
3532 function_decl::parameter, class_or_union,
3533 class_decl::base_spec, class_decl, decl_base and scope_decl
3534 overloads, remove redundant LOCAL_CHANGE_KIND.
3535 (enum_has_non_name_change): Remove redundant
3536 LOCAL_CHANGE_KIND.
3537
35382020-03-20 Dodji Seketeli <dodji@redhat.com>
3539
3540 dwarf-reader: Fix bloom filter access in GNU_HASH section
3541 * src/abg-dwarf-reader.cc (bloom_word_at): Properly read an
3542 element from the bloom bitmasks array of 32-bits values as a
3543 64-bits value in a portable way. Always return a 64 bits value.
3544 (lookup_symbol_from_gnu_hash_tab): Use a 64-bits value to store
3545 the bloom bitmask.
3546 * tests/data/test-lookup-syms/test1-32bits.so: New test input,
3547 compiled as a 32bits binary to test for ELFCLASS32 binaries.
3548 * tests/data/test-lookup-syms/test1.c.compiling.txt: Documentation
3549 about how to compile the test1[-21bits].so files.
3550 * tests/data/Makefile.am: Add the new test material above to
3551 source distribution.
3552 * tests/test-lookup-syms.cc (in_out_specs): Add the
3553 test1-32bits.so test case to this test harness.
3554
35552020-03-18 Giuliano Procida <gprocida@google.com>
3556
3557 Ensure change_kind enum values are used consistently.
3558 * src/abg-comparison.cc (distinct_diff::has_local_changes):
3559 Remove unnecessary parentheses around return expression.
3560 * src/abg-default-reporter.cc (report): In the reference_diff
3561 overload, replace test against LOCAL_CHANGE_KIND with test
3562 against ALL_LOCAL_CHANGES_MASK.
3563 * src/abg-ir.cc (equals): In the array_type_def and class_decl
3564 overloads, add missing LOCAL_TYPE_CHANGE_KIND. In the
3565 class_decl overload, also add missing LOCAL_CHANGE_KIND. In
3566 the enum_type_decl and function_decl::parameter overloads
3567 clarify pairing of LOCAL*CHANGE_KIND bits.
3568 (enum_has_non_name_change): Clarify pairing of
3569 LOCAL*CHANGE_KIND bits.
3570
35712020-03-18 Giuliano Procida <gprocida@google.com>
3572
3573 dwarf-reader: Use all bits of Bloom filter words.
3574 * src/abg-dwarf-reader.cc (lookup_symbol_from_gnu_hash_tab):
3575 Don't narrow calculated Bloom word to 8 bits before using it
3576 to mask the fetched Bloom word.
3577
35782020-03-15 Matthias Maennich <maennich@google.com>
3579
3580 dwarf-reader: remove superfluous ABG_ASSERT
3581 * src/abg-dwarf-reader.cc
3582 (maybe_adjust_et_rel_sym_addr_to_abs_addr): improve NULL check,
3583 remove superfluous ABG_ASSERT
3584 * tests/data/Makefile.am: Add new test case to the distribution.
3585 * tests/test-read-dwarf.cc: Likewise.
3586 * tests/data/test-read-dwarf/test27-bogus-binary.elf: New test case.
3587
35882020-03-15 Matthias Maennich <maennich@google.com>
3589
3590 test-read-dwarf: ensure in_elf_path exists and add missing test files
3591 * tests/data/Makefile.am: add missing test case files
3592 * tests/test-read-dwarf.cc (test_task::perform): assert the
3593 input elf file exists.
3594
35952020-03-18 Matthias Maennich <maennich@google.com>
3596
3597 configure: add support for memory sanitizer (--enable-msan)
3598 * configure.ac: Add configure options for -fsanitize=memory
3599
36002020-03-18 Dodji Seketeli <dodji@redhat.com>
3601
3602 abipkgdiff: fix documentation of --impacted-interface
3603 * tools/abipkgdiff.cc (display_usage): Use the same help string
3604 for the --impacted-interface option as abidiff does.
3605
36062020-03-15 Matthias Maennich <maennich@google.com>
3607
3608 abidiff: fix documentation of --impacted-interfaces
3609 * tools/abidiff.cc(display_usage): Fix doc string for
3610 --impacted-interfaces.
3611 Reported-by: Saravana Kannan <saravanak@google.com>
3612
36132020-03-17 Giuliano Procida <gprocida@google.com>
3614
3615 Tag add/remove/change lines unconditionally with [A], [D], [C].
3616 * src/abg-default-reporter.cc (report): In the corpus_diff
3617 override, remove calculations of number of changes (total) and
3618 comparisons against arbitrary threshold (large_num); emit [A],
3619 [D], [C] tags unconditionally.
3620 * src/abg-reporter-priv.cc
3621 (maybe_report_unreachable_type_changes): Remove comparisons of
3622 number of changes against arbitrary threshold (large_num);
3623 emit [A], [D], [C] tags unconditionally; fix quoting of
3624 deleted unreachable types; fix indentation of changed
3625 unreachable types.
3626 * tools/abipkgdiff.cc (compare_prepared_userspace_packages):
3627 Emit [D] and [A] tags for removed and added binaries.
3628 * tests/data/test-*/*report*.txt: In 109 report files, add
3629 tags [A], [D], [C] tags and correct some indentation and
3630 quoting.
3631
36322020-03-12 Matthias Maennich <maennich@google.com>
3633
3634 abg-workers: guard bring_workers_down to avoid dead lock
3635 * src/abg-workers.cc(do_bring_workers_down): keep
3636 task_todo_mutex locked while writing bring_workers_down,
3637 (wait_to_execute_a_task): rewrite the loop condition to ensure
3638 safe access to bring_workers_down.
3639
36402020-03-12 Matthias Maennich <maennich@google.com>
3641
3642 configure: add support for thread sanitizer (--enable-tsan)
3643 * configure.ac: Add configure options for -fsanitize=thread
3644
36452020-03-13 Matthias Maennich <maennich@google.com>
3646
3647 dwarf-reader: gnu_hash_tab lookup: fix overflow in bloom hash calculation
3648 * src/abg-dwarf-reader.cc(lookup_symbol_from_gnu_hash_tab): Fix
3649 signed integer overflow.
3650
36512020-03-12 Giuliano Procida <gprocida@google.com>
3652
3653 Treat function type changes as local.
3654 * src/abg-ir.cc (types_have_similar_structure): Always compare
3655 function types (instead of just returning true) regardless of
3656 whether they are components of pointer-to-function or
3657 reference-to-function types.
3658 * tests/data/Makefile.am: Add new test case files.
3659 * tests/data/test-abidiff-exit/test-leaf2-report.txt: New test
3660 case.
3661 * tests/data/test-abidiff-exit/test-leaf2-v0.cc: Ditto.
3662 * tests/data/test-abidiff-exit/test-leaf2-v0.o: Ditto.
3663 * tests/data/test-abidiff-exit/test-leaf2-v1.cc: Ditto.
3664 * tests/data/test-abidiff-exit/test-leaf2-v1.o: Ditto.
3665 * tests/test-abidiff-exit.cc: Run new test case.
3666
36672020-03-13 Giuliano Procida <gprocida@google.com>
3668
3669 Output 2-space indentation consistently.
3670 * src/abg-default-reporter.cc (report): In the
3671 class_or_union_diff override, use 2-space indentation when
3672 listing changed members. In the var_diff override, do the same
3673 for variable type changes.
3674 * src/abg-leaf-reporter.cc: Ditto.
3675 * tests/data/test-*/*report*.txt: Update many test cases.
3676
36772020-03-16 Giuliano Procida <gprocida@google.com>
3678
3679 Eliminate some unnecessary blank lines in diff output.
3680 * src/abg-default-reporter.cc (report): In the type_decl_diff,
3681 enum_diff, array_diff, class_diff, union_diff and var_diff
3682 overrides, simplify new line logic which no longer needs to be
3683 threaded through report_name_size_and_alignment_changes. In
3684 the distinct_diff override, simplify new line logic which no
3685 longer needs to be threaded through
3686 report_size_and_alignment_changes. In the enum_diff override,
3687 emit just one blank line after each enum. In the array_diff
3688 override, remove stray location reporting which doesn't appear
3689 to ever trigger; fix new line logic. In the
3690 class_or_union_diff override, simplify new line logic for
3691 deleted members; pass indentation to represent_data_member.
3692 * src/abg-leaf-reporter.cc (report): In the array_diff,
3693 class_diff, union_diff and var_diff overrides, simplify new
3694 line logic which no longer needs to be threaded through
3695 report_name_size_and_alignment_changes. In the distinct_diff
3696 override, simplify new line logic which no longer needs to be
3697 threaded through report_size_and_alignment_changes. In the
3698 array_diff override, remove stray location reporting which
3699 doesn't appear to ever trigger; fix new line handling. In the
3700 class_or_union_diff override, simplify new line logic for
3701 deleted members; pass indentation to represent_data_member.
3702 In the corpus_diff override, tabify source indentation.
3703 * src/abg-reporter-priv.cc (represent_data_member): Handle
3704 indentation; fix new line logic.
3705 (report_size_and_alignment_changes): Fix new line logic
3706 for "type size hasn't changed" message; simplify new line
3707 logic and replace local bool n with argument bool nl for
3708 clarity.
3709 (report_size_and_alignment_changes): Remove bool nl argument
3710 and associated code as it had become always false; take
3711 responsibility for emitting terminating new lines and change
3712 return type to void.
3713 (report_name_size_and_alignment_changes): Fix new line logic;
3714 remove bool nl argument and associated code as it had become
3715 always false; take responsibility for emitting terminating new
3716 lines and change return type to void.
3717 (maybe_report_interfaces_impacted_by_diff) In both overrides,
3718 remove new line prefix code and new_line_prefix argument.
3719 * src/abg-reporter-priv.h (represent_data_member): Add indent
3720 argument.
3721 (report_size_and_alignment_changes) Remove bool nl argument;
3722 change return type to void.
3723 (report_name_size_and_alignment_changes) Remove bool nl
3724 argument; change return type to void.
3725 (maybe_report_interfaces_impacted_by_diff) In both overrides,
3726 remove new_line_prefix argument.
3727 * tests/data/test-*/*report*.txt: Remove some blank lines.
3728
37292020-03-12 Giuliano Procida <gprocida@google.com>
3730
3731 abg-leaf-reporter.cc: Fix indentation of function parameter diffs.
3732 * src/abg-leaf-reporter.cc (report): In the fn_parm_diff
3733 override, indent the lines of detail by 2 spaces.
3734 * tests/data/test-abidiff-exit/test-leaf3-report.txt: Update
3735 report with correct indentation.
3736
37372020-03-12 Giuliano Procida <gprocida@google.com>
3738
3739 Fix interaction of --redundant and --leaf-changes-only options.
3740 * src/abg-comparison.cc (diff_context::show_leaf_changes_only):
3741 Remove "--leaf-changes-only implies --redundant" logic.
3742 * tools/abidiff.cc (display_usage): Mention that
3743 --leaf-changes-only implies --redundant.
3744 (set_diff_context_from_opts): Make --leaf-changes-only imply
3745 --redundant; document this behaviour in a comment.
3746 * tools/abipkgdiff.cc: Ditto.
3747 * tests/data/Makefile.am: Add new test case files.
3748 * tests/data/test-abidiff-exit/test-leaf3-report.txt: Add new
3749 test case, to show --leaf-changes-only implies --redundant.
3750 * tests/data/test-abidiff-exit/test-leaf3-v0.c: Ditto.
3751 * tests/data/test-abidiff-exit/test-leaf3-v0.o: Ditto.
3752 * tests/data/test-abidiff-exit/test-leaf3-v1.c: Ditto.
3753 * tests/data/test-abidiff-exit/test-leaf3-v1.o: Ditto.
3754 * tests/test-abidiff-exit.cc: Run new test case.
3755 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt:
3756 Update abipkgdiff report with --redundant output.
3757 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt:
3758 Ditto.
3759 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
3760 Ditto.
3761
37622020-03-13 Giuliano Procida <gprocida@google.com>
3763
3764 Add more leaf change reporting.
3765 * doc/manuals/abidiff.rst: Update the documentation for
3766 --leaf-changes-only.
3767 * doc/manuals/abipkgdiff.rst: Likewise.
3768 * src/abg-comparison.cc (emit_diff_stats): Exclude non-leaf
3769 changes to variables from the reported total of leaf changes.
3770 * src/abg-default-reporter.cc (report): In the corpus_diff
3771 override, move some code and comments for clarity.
3772 * src/abg-leaf-reporter.cc (report): In the corpus_diff
3773 override, additionally report removed/added/changed variables
3774 and removed/added symbols absent from debug info.
3775 * tests/data/Makefile.am: Add new test case files.
3776 * tests/data/test-abidiff-exit/test-leaf0-report.txt: Update
3777 to include reporting of variable diff (change of type).
3778 * tests/data/test-abidiff-exit/test-leaf1-report.txt: New test
3779 case with added/removed variables/functions and changed
3780 variables (both local and non-local type changes).
3781 * tests/data/test-abidiff-exit/test-leaf1-v0.cc: Ditto.
3782 * tests/data/test-abidiff-exit/test-leaf1-v0.o: Ditto.
3783 * tests/data/test-abidiff-exit/test-leaf1-v1.cc: Ditto.
3784 * tests/data/test-abidiff-exit/test-leaf1-v1.o: Ditto.
3785 * tests/test-abidiff-exit.cc: Run new test case. Supply
3786 --redundant otherwise the test isn't meaningful.
3787
37882020-03-12 Dodji Seketeli <dodji@redhat.com>
3789
3790 Update fedabipkgdiff tests according to commit b602f46c
3791 * tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
3792 Adjust for useless whitespace removal.
3793 * tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt: Likewise.
3794 * tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt: Likewise.
3795 * tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt: Likewise.
3796 * tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt: Likewise.
3797
37982020-03-11 Giuliano Procida <gprocida@google.com>
3799
3800 Fix spurious new lines after diff sections.
3801 * src/abg-default-reporter.cc (report): In the corpus_diff
3802 overload, just use a local boolean emitted state variable
3803 within each section to determine whether or not to follow the
3804 section with an extra new line.
3805 * src/abg-leaf-reporter.cc: Ditto.
3806 * tests/data/test-*/*report*.txt: Remove unwanted new lines
3807 from 27 files.
3808
38092020-03-10 Giuliano Procida <gprocida@google.com>
3810
3811 abg-comparison.cc: Remove stray function declaration.
3812 * src/abg-comparison.cc (show_relative_offset_changes): Remove
3813 this stray function declaration.
3814
38152020-03-10 Giuliano Procida <gprocida@google.com>
3816
3817 abisym: Remove leading space in output.
3818 * tools/abisym.cc (main): Remove leading space from output.
3819 * tests/data/test-lookup-syms/test0-report.txt: Remove leading
3820 space from expected output.
3821 * tests/data/test-lookup-syms/test01-report.txt: Ditto.
3822 * tests/data/test-lookup-syms/test02-report.txt: Ditto.
3823 * tests/data/test-lookup-syms/test1-1-report.txt: Ditto.
3824
38252020-03-09 Giuliano Procida <gprocida@google.com>
3826
3827 Fix the reporting of leaf change statistics.
3828 * src/abg-comparison.cc
3829 (apply_filters_and_compute_diff_stats): Increment the correct
3830 counter for leaf variable changes.
3831 * tests/data/Makefile.am: Add new test case files.
3832 * tests/data/test-abidiff-exit/test-leaf0-report.txt: New test
3833 case.
3834 * tests/data/test-abidiff-exit/test-leaf0-v0.cc: Ditto.
3835 * tests/data/test-abidiff-exit/test-leaf0-v0.o: Ditto.
3836 * tests/data/test-abidiff-exit/test-leaf0-v1.cc: Ditto.
3837 * tests/data/test-abidiff-exit/test-leaf0-v1.o: Ditto.
3838 * tests/test-abidiff-exit.cc: Run new test case.
3839 Reviewed-by: Matthias Maennich <maennich@google.com>
3840
38412020-03-05 Giuliano Procida <gprocida@google.com>
3842
3843 Add space missing between "[C]" tag and description of changed item.
3844 * src/abg-default-reporter.cc (report): In the overload for
3845 corpus_diff, output space after "[C]".
3846 * src/abg-leaf-reporter.cc (report): Likewise.
3847 * tests/data/test-*/*report*.txt: Update all the test
3848 reports.
3849
38502020-03-05 Giuliano Procida <gprocida@google.com>
3851
3852 Correct various inconsequential typos.
3853 * src/abg-leaf-reporter.cc (report): In the class_or_union_diff
3854 overoad, swap calls to report_mem_header to match the rest of the
3855 code.
3856 * src/abg-reporter-priv.cc (represent): In the var_diff_sptr
3857 overload, add some missing whitespace; remember we've emitted the
3858 pretty representation in 2 cases where this was omitted (though 1
3859 of these is the last case where it makes no difference).
3860 maybe_report_diff_for_symbol Add some missing whitespace; remember
3861 we've reported a diff (and need a trailing newline) in 1 case
3862 where this was omitted, also affecting the return value of the
3863 function (but no caller cares).
3864
38652020-03-05 Giuliano Procida <gprocida@google.com>
3866
3867 Correct spelling of "alignment".
3868 * src/abg-reporter-priv.cc: s/alignement/alignment/
3869 * tests/data/test-abidiff/test-struct0-report.txt: Ditto..
3870 * tests/data/test-abidiff/test-struct1-report.txt: Ditto.
3871 * tests/data/test-abidiff/test-var0-report.txt: Ditto.
3872
38732020-02-27 Dodji Seketeli <dodji@redhat.com>
3874
3875 Bump version number to 1.8
3876 * configure.ac: Update version number to 1.8
3877
38782020-02-26 Dodji Seketeli <dodji@redhat.com>
3879
3880 Update website for 1.7
3881 * doc/website/mainpage.txt: Update for 1.7
3882
12020-02-25 Dodji Seketeli <dodji@redhat.com> 38832020-02-25 Dodji Seketeli <dodji@redhat.com>
2 3884
3 Update ChangeLog 3885 Update ChangeLog