summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2020-02-25 15:22:15 +0100
committerDodji Seketeli <dodji@redhat.com>2020-02-26 12:08:52 +0100
commitfbc508fea6c9f4cd6dd4f4437ce386d1eae76231 (patch)
treee4dcf7129081a347e3e91992c9a13068a4d308c8 /ChangeLog
parentUpdate NEWS file for 1.7 (diff)
downloadlibabigail-fbc508fea6c9f4cd6dd4f4437ce386d1eae76231.tar.gz
libabigail-fbc508fea6c9f4cd6dd4f4437ce386d1eae76231.tar.bz2
libabigail-fbc508fea6c9f4cd6dd4f4437ce386d1eae76231.tar.xz
Update ChangeLog
* ChangeLog: Automatically update by running: 'make update-changelog'. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog2622
1 files changed, 2622 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 69357179..64e6ce52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,2625 @@
12020-02-25 Dodji Seketeli <dodji@redhat.com>
2
3 Update ChangeLog
4 * ChangeLog: Automatically update by running:
5 'make update-changelog'.
6
72020-02-25 Dodji Seketeli <dodji@redhat.com>
8
9 Update NEWS file for 1.7
10 * NEWS: update for 1.7
11
122020-02-25 Dodji Seketeli <dodji@redhat.com>
13
14 gen-changelog.py: Update the script for python3
15 * gen-changelog.py (process_commit): Use the functional notation
16 for the print function invocation required by python3.
17 (output_commits, get_rel_tags, ): Specify that the output stream
18 of the subprocess running the git command is in the text format.
19
202020-02-26 Dodji Seketeli <dodji@redhat.com>
21
22 tools-utils: Drop redefinition of fopen when BAD_FTS is defined
23 * src/abg-tools-utils.cc: Do not remap fopen to fopen64 as we
24 don't use fopen explicitly anymore.
25
262020-02-21 Dodji Seketeli <dodji@redhat.com>
27
28 Update copyright year to 2020
29 * include/abg-comp-filter.h: Update copyright year to 2020.
30 * include/abg-comparison.h: Likewise.
31 * include/abg-config.h: Likewise.
32 * include/abg-corpus.h: Likewise.
33 * include/abg-cxx-compat.h: Likewise.
34 * include/abg-diff-utils.h: Likewise.
35 * include/abg-dwarf-reader.h: Likewise.
36 * include/abg-fwd.h: Likewise.
37 * include/abg-hash.h: Likewise.
38 * include/abg-ini.h: Likewise.
39 * include/abg-interned-str.h: Likewise.
40 * include/abg-ir.h: Likewise.
41 * include/abg-libxml-utils.h: Likewise.
42 * include/abg-libzip-utils.h: Likewise.
43 * include/abg-reader.h: Likewise.
44 * include/abg-reporter.h: Likewise.
45 * include/abg-sptr-utils.h: Likewise.
46 * include/abg-suppression.h: Likewise.
47 * include/abg-tools-utils.h: Likewise.
48 * include/abg-traverse.h: Likewise.
49 * include/abg-viz-common.h: Likewise.
50 * include/abg-viz-dot.h: Likewise.
51 * include/abg-viz-svg.h: Likewise.
52 * include/abg-workers.h: Likewise.
53 * include/abg-writer.h: Likewise.
54 * src/abg-comp-filter.cc: Likewise.
55 * src/abg-comparison-priv.h: Likewise.
56 * src/abg-comparison.cc: Likewise.
57 * src/abg-config.cc: Likewise.
58 * src/abg-corpus-priv.h: Likewise.
59 * src/abg-corpus.cc: Likewise.
60 * src/abg-default-reporter.cc: Likewise.
61 * src/abg-diff-utils.cc: Likewise.
62 * src/abg-dwarf-reader.cc: Likewise.
63 * src/abg-hash.cc: Likewise.
64 * src/abg-ini.cc: Likewise.
65 * src/abg-internal.h: Likewise.
66 * src/abg-ir-priv.h: Likewise.
67 * src/abg-ir.cc: Likewise.
68 * src/abg-leaf-reporter.cc: Likewise.
69 * src/abg-libxml-utils.cc: Likewise.
70 * src/abg-libzip-utils.cc: Likewise.
71 * src/abg-reader.cc: Likewise.
72 * src/abg-reporter-priv.cc: Likewise.
73 * src/abg-reporter-priv.h: Likewise.
74 * src/abg-sptr-utils.cc: Likewise.
75 * src/abg-suppression-priv.h: Likewise.
76 * src/abg-suppression.cc: Likewise.
77 * src/abg-tools-utils.cc: Likewise.
78 * src/abg-traverse.cc: Likewise.
79 * src/abg-viz-common.cc: Likewise.
80 * src/abg-viz-dot.cc: Likewise.
81 * src/abg-viz-svg.cc: Likewise.
82 * src/abg-workers.cc: Likewise.
83 * src/abg-writer.cc: Likewise.
84 * tests/print-diff-tree.cc: Likewise.
85 * tests/test-abicompat.cc: Likewise.
86 * tests/test-abidiff-exit.cc: Likewise.
87 * tests/test-abidiff.cc: Likewise.
88 * tests/test-alt-dwarf-file.cc: Likewise.
89 * tests/test-core-diff.cc: Likewise.
90 * tests/test-diff-dwarf-abixml.cc: Likewise.
91 * tests/test-diff-dwarf.cc: Likewise.
92 * tests/test-diff-filter.cc: Likewise.
93 * tests/test-diff-pkg.cc: Likewise.
94 * tests/test-diff-suppr.cc: Likewise.
95 * tests/test-diff2.cc: Likewise.
96 * tests/test-dot.cc: Likewise.
97 * tests/test-ini.cc: Likewise.
98 * tests/test-ir-walker.cc: Likewise.
99 * tests/test-lookup-syms.cc: Likewise.
100 * tests/test-read-dwarf.cc: Likewise.
101 * tests/test-read-write.cc: Likewise.
102 * tests/test-svg.cc: Likewise.
103 * tests/test-tools-utils.cc: Likewise.
104 * tests/test-types-stability.cc: Likewise.
105 * tests/test-utils.cc: Likewise.
106 * tests/test-utils.h: Likewise.
107 * tests/test-write-read-archive.cc: Likewise.
108 * tools/abiar.cc: Likewise.
109 * tools/abicompat.cc: Likewise.
110 * tools/abidiff.cc: Likewise.
111 * tools/abidw.cc: Likewise.
112 * tools/abilint.cc: Likewise.
113 * tools/abipkgdiff.cc: Likewise.
114 * tools/abisym.cc: Likewise.
115 * tools/binilint.cc: Likewise.
116 * tools/kmidiff.cc: Likewise.
117 * update-copyright.sh: Fix the updating script to handle not just
118 "Red Hat, Inc."
119
1202020-02-21 Dodji Seketeli <dodji@redhat.com>
121
122 abixml-reader: Support SONAME related properties on file suppression
123 * doc/manuals/libabigail-concepts.rst: Update the documentation to
124 mention soname_regexp and soname_not_regexp is supported in the
125 [suppress_file] section.
126 * include/abg-suppression.h (suppression_matches_soname)
127 (suppression_matches_soname_or_filename): Declare new functions.
128 Make them be friends of class suppression_base.
129 * src/abg-reader.cc
130 (read_context::corpus_is_suppressed_by_soname_or_filename): Define
131 new member function.
132 (read_corpus_from_input): Apply file suppression.
133 * src/abg-suppression.cc (read_file_suppression): Support
134 "soname_regexp" and "soname_not_regexp" in the [suppress_file]
135 section.
136 (suppression_matches_soname)
137 (suppression_matches_soname_or_filename): Define new functions.
138 * tests/data/test-diff-suppr/libtest48-soname-abixml-report-{1,2}.txt:
139 New test reference output files.
140 Likewise.
141 * tests/data/test-diff-suppr/libtest48-soname-abixml-suppr.txt:
142 New test suppression file.
143 * tests/data/test-diff-suppr/libtest48-soname-abixml-suppr-{2,3,4}.txt::
144 Likewise.
145 * tests/data/test-diff-suppr/libtest48-soname-abixml-v{0,1}.so: New
146 test binary input files.
147 * tests/data/test-diff-suppr/libtest48-soname-abixml-v{0,1}.so.abi:
148 New abixml for the binary input files above.
149 * tests/data/test-diff-suppr/test48-soname-abixml-v{0,1}.c: Source
150 code of the binary input files above.
151 * tests/data/Makefile.am: Add the above test material to source
152 distribution.
153 * tests/test-diff-suppr.cc (in_out_specs): Add the test input
154 above to this test harness.
155
1562020-02-21 Dodji Seketeli <dodji@redhat.com>
157
158 suppression: Better handle soname/filename properties evaluation
159 * include/abg-suppression.h
160 (suppression_base::has_{soname,file_name}_related_property): Add
161 new member functions.
162 * src/abg-dwarf-reader.cc (read_context::suppression_can_match):
163 Fix the logic to make a difference between the case where the
164 suppression doesn't have any soname/filename property and the case
165 where the suppression does have a soname/filename property that
166 does not match the current binary.
167 * src/abg-reader.cc (read_context::suppression_can_match):
168 Likewise.
169 * src/abg-suppression-priv.h
170 (suppression_base::priv::matches_soname): If the suppression does
171 not have any soname related property then it doesn't match the
172 soname we are looking at.
173 (suppression_base::priv::matches_binary_name): If the suppression
174 does not have any filename related property then it doesn't match
175 the filename we are looking at.
176 * src/abg-suppression.cc
177 (suppression_base::has_{soname,file_name}_related_property):
178 Define new member functions.
179 (sonames_of_binaries_match): If the suppression does not have any
180 soname related property then it doesn't match the corpora of the
181 diff we are looking at.
182 (names_of_binaries_match): If the suppression does not have any
183 filename related property then it doesn't match the corpora of the
184 diff we are looking at.
185 (type_suppression::suppresses_type): Fix the logic to make a
186 difference between the case where the suppression doesn't have any
187 soname/filename property and the case where the suppression does
188 have a soname/filename property that does not match the current
189 binary.
190 (function_suppression::suppresses_{function, function_symbol}):
191 Likewise.
192 (variable_suppression::suppresses_{variable, variable_symbol}):
193 Likewise.
194 (file_suppression::suppresses_file): Likewise.
195
1962020-02-05 Giuliano Procida <gprocida@google.com>
197
198 Fix stray comma in leaf-changes-only mode.
199 * src/abg-reporter-priv.cc (represent): Don't try to follow
200 output of indented pretty representation with a comma, just
201 emit "and" unconditionally; remove unnecessary intermediate
202 ostringstream.
203 * tests/data/Makefile.am: Add new test case files.
204 * tests/data/test-abidiff-exit/test-no-stray-comma-*: New test
205 cases.
206 * tests/data/test-diff-suppr/test46-PR25128-report-?.txt:
207 Replace unindented comma with indented "and".
208 * tests/test-abidiff-exit.cc: Add no-stray-comma test case.
209 Reviewed-by: Matthias Maennich <maennich@google.com>
210
2112020-02-04 Giuliano Procida <gprocida@google.com>
212
213 Sort kernel module object files before processing them.
214 * src/abg-tools-utils.cc (get_binary_paths_from_kernel_dist):
215 Sort module_paths.
216
2172020-02-04 Matthias Maennich <maennich@google.com>
218
219 abg-workers: Rework the worker queue to improve concurrent behaviour
220 * include/abg-workers.h (workers::task): move entire
221 implementation to header and drop superfluous forward declaration.
222 * src/abg-workers.cc (workers::task):: Likewise.
223 (workers::queue::priv): Drop queue_cond_mutex, rename queue_cond
224 to tasks_todo_cond, add task_done_cond, make default_notify
225 static.
226 (workers::queue::priv::priv): Add default arguments to fully
227 qualified constructor, drop the remaining ones.
228 (workers::queue:prive::more_tasks_to_execute): Drop method.
229 (workers::queue:prive::schedule_task): Do not synchronize access
230 to the queue condition variable, but only on the mutex.
231 (do_bring_workers_down): Likewise. Also await tasks_done to be
232 empty.
233 (workers::queue:prive::worker::wait_to_execute_a_task): Await
234 tasks on the tasks_todo with tasks_todo_(cond|mutex) and signal
235 task completion to tasks_done_cond.
236
2372020-02-03 Matthias Maennich <maennich@google.com>
238
239 abg-dwarf-reader: zero initialize local Dwarf_Addr values
240 * src/abg-dwarf-reader.cc
241 (read_context::get_first_exported_fn_address_from_DW_AT_ranges):
242 initialize local Dwarf_Addr variables.
243 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
244
2452020-01-29 Matthias Maennich <maennich@google.com>
246
247 abg-comparison: prefer .empty() over implicit bool conversion of .size()
248 * src/abg-comparison.cc (corpus_diff::has_changes): prefer
249 !container.empty() over bool(container.size())
250 [1] https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html
251 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
252
2532020-01-29 Matthias Maennich <maennich@google.com>
254
255 Fix some parameter name inconsistencies
256 * src/abg-comparison-priv.h
257 (corpus_diff::priv::count_unreachable_types): use consistent
258 parameter naming.
259 * tools/abidiff.cc(main): Likewise.
260 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
261
2622020-02-03 Giuliano Procida <gprocida@google.com>
263
264 Don't ignore options when diffing translation units (.bi files).
265 * tests/data/Makefile.am: Add test case files.
266 * tests/data/test-abidiff-exit/test-loc-*: New test cases.
267 * tests/test-abidiff-exit.cc (in_out_specs): Add new test cases.
268 * tools/abidiff.cc (main): Use populated ctxt for translation unit
269 diff.
270
2712020-01-29 Giuliano Procida <gprocida@google.com>
272
273 Fix typo in COMPILING.
274 * COMPILING:
275
2762020-01-29 Giuliano Procida <gprocida@google.com>
277
278 Remove redundant mention of libtool in COMPILING documentation.
279 * COMPILING: Remove redundant mention of libtool.
280
2812020-01-26 Matthias Maennich <maennich@google.com>
282
283 Testing: add Catch Unit test framework
284 * tests/.gitignore: Add entry for .dirstamp
285 * tests/Makefile.am: Add libcatch test library and use it for
286 runtestkmiwhitelist.
287 * tests/lib/catch.cc: New test driver implementation.
288 * tests/lib/catch.hpp: Add Catch v1.12.2 header only test library.
289 * tests/test-kmi-whitelist.cc: Migrate to use Catch test framework.
290 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
291
2922020-01-25 Matthias Maennich <maennich@google.com>
293
294 abg-fwd: drop duplicate forward declaration for corpus_sptr
295 * include/abg-fwd.h: drop superfluous forward declaration.
296
2972020-01-25 Matthias Maennich <maennich@google.com>
298
299 Fix / add include guards
300 * include/abg-dwarf-reader.h: Move include guard to the beginning.
301 * include/abg-reporter-priv.h: Likewise.
302 * include/abg-libxml-utils.h: Add include guard.
303 * include/abg-libzip-utils.h: Likewise.
304
3052020-01-25 Matthias Maennich <maennich@google.com>
306
307 dwarf-reader: handle binaries with missing symtab
308 * src/abg-dwarf-reader.cc (load_symbol_maps_from_symtab_section):
309 Handle elf file with missing symtab.
310 * tests/test-read-dwarf.cc (InOutSpec): add test case.
311 * tests/data/test-read-dwarf/test26-bogus-binary.elf: new test data.
312
3132020-01-24 Matthias Maennich <maennich@google.com>
314
315 dwarf-reader: handle symtab.section_header.sh_entsize == 0
316 * src/abg-dwarf-reader.cc (load_symbol_maps_from_symtab_section):
317 Handle elf file with invalid sh_entsize.
318 * tests/test-read-dwarf.cc (test_task::perform): handle empty
319 in_abi_path and out_abi_path as 'read only' test.
320 (InOutSpec): add test case.
321 * tests/data/test-read-dwarf/test25-bogus-binary.elf: new test data.
322
3232020-01-21 Matthias Maennich <maennich@google.com>
324
325 clang-format: Better approximation for binary operators and assignments
326 * .clang-format: Add BreakBeforeBinaryOperators option.
327
3282020-01-14 Matthias Maennich <maennich@google.com>
329
330 KMI Whitelists: Drop old whitelist extraction methods
331 * include/abg-tools-utils.h
332 (gen_suppr_spec_from_kernel_abi_whitelist): Delete declaration.
333 * src/abg-tools-utils.cc
334 (gen_suppr_spec_from_kernel_abi_whitelist): Delete definition
335 and migrate users to gen_suppr_spec_from_kernel_abi_whitelists.
336 * tools/abidiff.cc (set_suppressions): Migrate from using
337 gen_suppr_spec_from_kernel_abi_whitelist to
338 gen_suppr_spec_from_kernel_abi_whitelists.
339 * tools/abidw.cc (set_suppressions): Likewise.
340 * tools/abipkgdiff.cc: Drop unused using definition.
341 * tools/kmidiff.cc: Likewise.
342 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
343
3442020-01-14 Matthias Maennich <maennich@google.com>
345
346 KMI Whitelists: Add functionality to make whitelists additive
347 * include/abg-tools-utils.h
348 (gen_suppr_spec_from_kernel_abi_whitelists): New function.
349 * src/abg-tools-utils.cc
350 (gen_suppr_spec_from_kernel_abi_whitelists): Likewise.
351 * tests/.gitignore: Ignore new test executable.
352 * tests/Makefile.am: Add new test executable.
353 * tests/data/test-kmi-whitelist/whitelist-with-another-single-entry:
354 New test input file.
355 * tests/data/test-kmi-whitelist/whitelist-with-duplicate-entry:
356 Likewise.
357 * tests/data/test-kmi-whitelist/whitelist-with-single-entry:
358 Likewise.
359 * tests/data/test-kmi-whitelist/whitelist-with-two-sections:
360 Likewise.
361 * tests/data/Makefile.am: Add above test material.
362 * tests/test-kmi-whitelist.cc: Add new test executable.
363 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
364
3652020-01-13 Matthias Maennich <maennich@google.com>
366
367 writer: completely skip over empty corpora
368 * src/abg-writer.cc (write_corpus): completely skip empty
369 corpora rather than creating an empty entry for them.
370 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
371
3722020-01-13 Matthias Maennich <maennich@google.com>
373
374 corpus: is_empty: consider actual translation unit contents
375 * src/abg-corpus.cc (corpus::is_empty): consider a list of
376 empty members to be empty.
377 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
378
3792020-01-13 Matthias Maennich <maennich@google.com>
380
381 abg-reader: handle empty corpus nodes in xml representation
382 * src/abg-reader.cc (read_corpus_from_input): when assigning a
383 corpus node, assure the node actually has children.
384 * tests/test-abidiff.cc (main): Add test for variants of empty
385 xml nodes to the test harness.
386 * tests/data/test-abidiff/test-empty-corpus-0.xml: Test input
387 containing an empty xml node that closes immediately.
388 * tests/data/test-abidiff/test-empty-corpus-0.xml: Test input
389 containing an empty xml node that closes immediately with a tag.
390 * tests/data/test-abidiff/test-empty-corpus-0.xml: Test input
391 containing an empty xml node that closes with a tag on a new line.
392 * tests/data/test-abidiff/test-empty-corpus-report.txt:
393 Expected test output (empty abidiff) for diffing xml with itself.
394 * tests/data/Makefile.am: Add the new test input material above
395 to source distribution.
396 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
397
3982020-01-17 Dodji Seketeli <dodji@redhat.com>
399
400 Bug 25409 - Fix reading layout-offset-in-bits attribute of data-member
401 * src/abg-reader.cc (read_offset_in_bits): Fix comment. Use
402 stroull rather than atoi.
403 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0:
404 Add new binary test input.
405 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0-report-0.txt:
406 Add new reference output.
407 * tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi:
408 Add new abixml representation for the binary test input above.
409 * tests/data/Makefile.am: Add the new test material above to
410 source distribution.
411 * tests/test-diff-dwarf-abixml.cc (in_out_specs): Add the test
412 input above to the test harness.
413
4142020-01-13 Matthias Maennich <maennich@google.com>
415
416 abidiff/kmidiff: do not default-suppress added symbols
417 * tools/abidiff.cc (adjust_diff_context_for_kmidiff): Drop
418 default suppression of added symbols.
419 * tools/kmidiff.cc (set_diff_context): Likewise.
420 * tests/data/test-diff-suppr/test46-PR25128-report-1.txt: Adjust
421 test expectation.
422 * tests/data/test-diff-suppr/test46-PR25128-report-2.txt: Add
423 test case for abidiff with flag --no-added-syms.
424 * tests/data/Makefile.am: add new testcase.
425 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
426
4272019-12-15 Matthias Maennich <maennich@google.com>
428
429 Add (undocumented) support for version suffixes
430 * configure.ac: add substitution for VERSION_SUFFIX
431 * include/abg-version.h.in: add define for ABIGAIL_VERSION_SUFFIX
432 * include/abg-config.h(abigail_get_library_version): add support
433 for a version suffix
434 * src/abg-config.cc(abigail_get_library_version): Likewise.
435 * src/abg-tools-utils.cc(get_library_version_string): Likewise.
436 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
437
4382019-11-13 Matthias Maennich <maennich@google.com>
439
440 dwarf-reader: relax restriction about relocation sections in try_reading_first_ksymtab_entry
441 * src/abg-dwarf-reader.cc (try_reading_first_ksymtab_entry):
442 remove assertion and update documentation
443 Fixes: 43679a610316 ("dwarf-reader: refactor try_reading_first_ksymtab_entry_using{pre,}_v4_19_format")
444 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
445
4462019-11-11 Matthias Maennich <maennich@google.com>
447
448 abg-dwarf-reader: resolve relocation sections by index
449 * src/abg-dwarf-reader.cc (find_relocation_section): New function.
450 (find_ksymtab_reloc_section): Use find_relocation_section to
451 resolve the ksymtab's relocation section.
452 (find_ksymtab_gpl_reloc_section): Likewise.
453 Fixes: e6870326e01a ("Support pre and post v4.19 ksymtabs for Linux kernel modules")
454 Cc: Jessica Yu <jeyu@kernel.org>
455 Cc: Android Kernel Team <kernel-team@android.com>
456 Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
457
4582019-12-03 Dodji Seketeli <dodji@redhat.com>
459
460 Misc typo fixes
461 * src/abg-comparison.cc
462 (leaf_diff_node_marker_visitor::visit_begin): Fix typo in
463 comments.
464 * src/abg-corpus.cc
465 (corpus::get_types_not_reachable_from_public_interfaces):
466 Likewise.
467 * src/abg-ir.cc (decl_base::set_has_anonymous_parent): Likewise.
468 * src/abg-reader.cc (add_read_context_suppressions): Likewise.
469
4702019-11-13 Dodji Seketeli <dodji@redhat.com>
471
472 Bug 24690 - Support comparing non-reachable types of a binary
473 * include/abg-comparison.h (string_type_base_sptr_map): Define new
474 typedef.
475 (diff_context::show_unreachable_types): Declare new member
476 functions.
477 (corpus_diff::{deleted_unreachable_types,
478 deleted_unreachable_types_sorted, added_unreachable_types,
479 added_unreachable_types_sorted, changed_unreachable_types,
480 changed_unreachable_types_sorted}): Likewise.
481 (maybe_report_unreachable_type_changes): Declare this function a
482 friend of class corpus_diff.
483 (corpus_diff::diff_stats::{num_added_unreachable_types,
484 num_added_unreachable_types_filtered_out,
485 net_num_added_unreachable_types, num_removed_unreachable_types,
486 num_removed_unreachable_types_filtered_out,
487 net_num_removed_unreachable_types, num_changed_unreachable_types,
488 num_changed_unreachable_types_filtered_out,
489 net_num_changed_unreachable_types}): Likewise.
490 * src/abg-comparison-priv.h
491 (diff_context::priv::show_unreachable_types_): Define new data
492 member.
493 (diff_context::priv::priv): Initialize the new data member.
494 (diff_comp::operator()): Use pretty representation of diff
495 subjects to sort them, rather than just their name. Also, add
496 comment to the other member functions of diff_comp.
497 (corpus_diff::{unreachable_types_edit_script_,
498 deleted_unreachable_types_, deleted_unreachable_types_sorted_,
499 suppressed_deleted_unreachable_types_, added_unreachable_types_,
500 added_unreachable_types_sorted_,
501 suppressed_added_unreachable_types_, changed_unreachable_types_,
502 changed_unreachable_types_sorted_}): Define new data members.
503 (corpus_diff::priv::apply_supprs_to_added_removed_fns_vars_unreachable_types):
504 Changed the name of
505 corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars into
506 this.
507 (corpus_diff::priv::{added_unreachable_type_is_suppressed,
508 deleted_unreachable_type_is_suppressed,
509 changed_unreachable_types_sorted, count_unreachable_types}):
510 Declare new member functions.
511 (corpus_diff::diff_stats::priv::{num_added_unreachable_types,
512 num_added_unreachable_types_filtered_out,
513 num_removed_unreachable_types,
514 num_removed_unreachable_types_filtered_out,
515 num_changed_unreachable_types,
516 num_changed_unreachable_types_filtered_out}): Define new data
517 members.
518 (sort_string_type_base_sptr_map): Declare new function.
519 * src/abg-comparison.cc (sort_string_type_base_sptr_map)
520 (diff_context::show_unreachable_types): Define new functions.
521 (corpus_diff::diff_stats::{num_added_unreachable_types,
522 num_added_unreachable_types_filtered_out,
523 net_num_added_unreachable_types,
524 net_num_removed_unreachable_types,
525 num_removed_unreachable_types_filtered_out,
526 num_removed_unreachable_types}): Define new member functions.
527 (diff_maps::insert_diff_node): Do not update the map "diff ->
528 impacted interfaces" if the current impacted interface is nil.
529 This happens if we are looking at a diff node for a change on a
530 type that is not reachable from any interfaces.
531 (corpus_diff::priv::ensure_lookup_tables_populated): Handle the
532 edit script for unreachable types.
533 (corpus_diff::priv::apply_supprs_to_added_removed_fns_vars_unreachable_types):
534 Rename
535 corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars
536 into this. Apply suppression specifications to added and removed
537 unreachable types as well.
538 (corpus_diff::priv::{added,deleted}_unreachable_type_is_suppressed):
539 Define new member functions.
540 (corpus_diff::priv::{count_unreachable_types,
541 changed_unreachable_types_sorted}): Likewise.
542 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Update
543 statistics (including walking changed unreachable types to apply
544 categorization and redundancy filters to them) related to
545 unreachable types.
546 (corpus_diff::priv::emit_diff_stats): Emit diff stats related to
547 unreachable types.
548 (corpus_diff::priv::maybe_dump_diff_tree): Dump diff tree nodes
549 related to unreachable types.
550 (corpus_diff::{deleted_unreachable_types,
551 deleted_unreachable_types_sorted, added_unreachable_types,
552 added_unreachable_types_sorted, changed_unreachable_types,
553 changed_unreachable_types_sorted): Define new member functions.
554 (corpus_diff::has_changes): Take deleted/added/changed unreachable
555 types into account.
556 (corpus_diff::has_incompatible_changes): Take net removed/changed
557 unreachable types into account.
558 (corpus_diff::has_net_subtype_changes): Take net removed and
559 changed unreachable types into account.
560 (corpus_diff::has_net_changes): Take net removed/added/changed
561 unreachable types into account.
562 (corpus_diff::traverse): When traversing the components of a
563 corpus_diff node, make sure to traverse the changed unreachable
564 types of the corpus.
565 (leaf_diff_node_marker_visitor::visit_begin): Arrange for the fact
566 that the current topmost interface can be nil if we are looking at
567 types not reachable from global functions/variables. Also, make
568 sure that only leaf nodes that are reachable from a global
569 function/variable are recorded as leaf nodes.
570 (compute_diff): In the overload for corpus_sptr, compute the
571 changes between types not reachable from global functions and
572 variables, if the user wishes that we do so. Also, add more
573 comments.
574 (apply_suppressions): Update for the name change of the function
575 apply_suppressions_to_added_removed_fns_vars to
576 apply_supprs_to_added_removed_fns_vars_unreachable_types.
577 * include/abg-corpus.h
578 (corpus::{record_type_as_reachable_from_public_interfaces,
579 type_is_reachable_from_public_interfaces,
580 get_types_not_reachable_from_public_interfaces}): Declare new
581 member functions.
582 (corpus::recording_types_reachable_from_public_interface_supported):
583 Declare new virtual member function.
584 (corpus_group::get_public_types_pretty_representations): Declare
585 new member functons.
586 (corpus_group::recording_types_reachable_from_public_interface_supported):
587 Declare new virtual member function.
588 * src/abg-corpus-priv.h
589 (corpus::priv::{types_not_reachable_from_pub_ifaces_,
590 pub_type_pretty_reprs_}): Define new data members.
591 (corpus::priv::priv): Initialize the pub_type_pretty_reprs_ data
592 member because it's a pointer.
593 (corpus::priv::get_public_types_pretty_representations): Declare
594 new member function.
595 (corpus::priv::~priv): Declare a destructor.
596 * src/abg-corpus.cc
597 (corpus::priv::get_public_types_pretty_representations): Define
598 new member function.
599 (corpus::priv::~priv): Define new destructor to delete the new
600 pub_type_pretty_reprs_ member pointer.
601 (corpus::{record_type_as_reachable_from_public_interfaces,
602 type_is_reachable_from_public_interfaces,
603 get_types_not_reachable_from_public_interfaces,
604 recording_types_reachable_from_public_interface_supported}):
605 Define new member functions
606 (corpus_group::get_public_types_pretty_representations): Likewise.
607 * include/abg-diff-utils.h (struct deep_ptr_eq_functor): Document
608 the equality operator. Also, add an overload to the equality
609 operator, for weak_ptr<T>. The existing equality operator
610 overload was just for shared_ptr<T>.
611 * include/abg-fwd.h (is_user_defined_type): Declare function.
612 * include/abg-ir.h (operator!=(const decl_base_sptr&, const
613 decl_base_sptr&)): Declare new operator.
614 (type_maps::get_types_sorted_by_name): Declare
615 new member function.
616 (decl_base::{g,s}et_is_artificial): Declare new member function.
617 (function_decl::parameter::{g,s}et_artificial): Remove these
618 member functions.
619 * src/abg-ir.cc (operator!=(const decl_base_sptr&, const
620 decl_base_sptr&)): Define new operator.
621 (decl_base::priv::is_artificial_): Define new data
622 member.
623 (type_maps::priv::sorted_types_): Define new data member.
624 (struct type_name_comp): Define new comparison functor to sort
625 types based on their pretty representations.
626 (decl_base::priv::priv): Initialize it.
627 (decl_base::{g,s}et_is_artificial): Define new member functions.
628 (type_maps::get_types_sorted_by_name): Define new member function.
629 (is_user_defined_type): Define new function overloads.
630 (strip_typedef, function_type::{function_type, set_parameters}):
631 Adjust using decl_base::get_is_artificial rather than
632 function_decl::parameter::get_artificial.
633 (function_decl::parameter::priv::artificial_): Remove this data
634 member.
635 (function_decl::parameter::priv::priv): Adjust to the removal of
636 function_decl::parameter::priv::artificial_. This constructor
637 does not take an "is_artificial" flag anymore.
638 (function_decl::parameter::parameter): Adjust to the removal of
639 the is_artificial flag from the arguments of the constructor of
640 function_decl::parameter::parameter::priv.
641 (function_decl::parameter::get_artificial): Remove this member
642 function.
643 * src/abg-reporter-priv.h (maybe_report_unreachable_type_changes):
644 Declare new function.
645 * src/abg-reporter-priv.cc
646 (maybe_report_unreachable_type_changes): Define new function.
647 * src/abg-default-reporter.cc (default_reporter::report): In the
648 overload for corpus_diff&, report added/removed/changed types that
649 are not reachable from global functions and variables using the
650 new function maybe_report_unreachable_type_changes.
651 * src/abg-leaf-reporter.cc (leaf_reporter::report): In the
652 overload for corpus_diff, report changes to types unreachable from
653 global functions or variables, using the new function
654 maybe_report_unreachable_type_changes.
655 * src/abg-dwarf-reader.cc (build_ir_node_from_die): When the user
656 requests that all types be loaded, record relevant types as
657 reachable from global functions and variables.
658 (build_enum_type, add_or_update_class_type)
659 (add_or_update_union_type): Read the 'is-artificial' DWARF
660 attribute and set the corresponding decl_base property
661 accordingly.
662 (finish_member_function_reading, strip_typedef)
663 (function_type::function_type): Adjust using
664 decl_base::get_is_artificial, rather than
665 function_decl::parameter::get_artificial.
666 * include/abg-reader.h
667 (consider_types_not_reachable_from_public_interfaces): Declare new
668 function.
669 * src/abg-reader.cc
670 (read_context::m_tracking_non_reachable_types): Add new data
671 member.
672 (read_context::read_context): Initialize it.
673 (read_context::tracking_non_reachable_types): Define accessors for
674 the new data member above.
675 (read_is_declaration_only): Re-indent.
676 (read_is_artificial): Define new helper function.
677 (build_function_parameter): Use the new read_is_artificial
678 function here, rather than open-coding it.
679 (build_enum_type_decl, build_class_decl, build_union_decl):
680 Support reading the 'is-artificial' property by using the new
681 read_is_artificial function.
682 (read_corpus_from_input): If the user wants us to take
683 non-reachable types into account, then make sure we do so.
684 (read_tracking_non_reachable_types, read_is_non_reachable_type):
685 Define new static functions.
686 (handle_element_node, build_type): Read the "is-non-reachable"
687 attribute on type element nodes if the user wants us to track
688 non-reachable types.
689 (consider_types_not_reachable_from_public_interfaces): Define new
690 function.
691 * src/abg-writer.cc (write_is_artificial): Define new static
692 helper function.
693 (annotate): Adjust using decl_base::get_is_artificial rather than
694 function_decl::parameter::get_artificial.
695 (write_enum_type_decl, write_class_decl_opening_tag)
696 (write_union_decl_opening_tag): Support writing the
697 "is-artificial" property, using the new write_is_artificial
698 function.
699 (write_function_type): Adjust this to use the new
700 write_is_artificial rather than open-coding writing the
701 'is-artificial' attribute.
702 (write_is_non_reachable)
703 (write_tracking_non_reachable_types): Define new static functions.
704 (write_enum_type_decl, write_class_decl_opening_tag)
705 (write_union_decl_opening_tag): Write the 'is-no-reachable'
706 attribute when applicable.
707 (write_corpus, write_corpus_group): Write the
708 'tracking-non-reachable-types' attribute when applicable.
709 * tools/abidiff.cc (options::options): Initialize ...
710 (options::show_all_types): ... new data member.
711 (display_usage): Add help string from the new
712 --non-reachable-types option.
713 (parse_command_line): Parse the new --non-reachable-types option.
714 (set_diff_context_from_opts): Set the
715 dwarf_reader::read_context::show_unreachable_types property.
716 (set_native_xml_reader_options): Define new
717 static function.
718 (main): Load all types when analyzing the DWARF or the ABIXML
719 files, if the user wants us to do so.
720 * tools/abipkgdiff.cc (options::show_all_types): Define new data
721 member.
722 (options::options): Initialize it.
723 (parse_command_line): Parse the --non-reachable-types option to
724 set the options::show_all_types data member.
725 (display_usage): Add a help string for the new
726 --non-reachable-types option.
727 (set_diff_context_from_opts): Set the
728 dwarf_reader::read_context::show_unreachable_types property based
729 on the options::show_all_type data member.
730 (compare): Configure the read context to load all types while
731 analyzing the DWARF info, depending on the options::show_all_type
732 data member.
733 * doc/manuals/abidiff.rst: Document the new --non-reachable-types
734 option added to abidiff above.
735 * doc/manuals/abipkgdiff.rst: Add documentation for the
736 --non-reachable-types option.
737 * tests/data/test-diff-suppr/test47-non-reachable-types-v{0,1}.c:
738 Source code files of test binary input.
739 * tests/data/test-diff-suppr/test47-non-reachable-types-suppr-{1,2,3,4,5}.txt:
740 New test input files.
741 * tests/data/test-diff-suppr/test47-non-reachable-types-report-{1,2,3,4,5,6,7,8,9,10}.txt:
742 New test reference output files.
743 * tests/data/test-diff-suppr/test47-non-reachable-types-v{0,1}.o.alltypes.abixml:
744 New test input abixml.
745 * tests/data/Makefile.am: Add the new test material to source
746 distribution.
747 * tests/test-diff-suppr.cc (in_out_specs): Add the new tests above
748 to this test harness.
749 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
750 * tests/data/test-diff-pkg/PR24690/flatpak-debuginfo-1.2.4-3.fc30.x86_64.rpm:
751 New input binary RPM.
752 * tests/data/test-diff-pkg/PR24690/flatpak-debuginfo-1.4.0-1.fc30.x86_64.rpm:
753 Likewise.
754 * tests/data/test-diff-pkg/PR24690/flatpak-devel-1.2.4-3.fc30.x86_64.rpm:
755 Likewise.
756 * tests/data/test-diff-pkg/PR24690/flatpak-devel-1.4.0-1.fc30.x86_64.rpm:
757 Likewise.
758 * tests/data/test-diff-pkg/PR24690/flatpak-libs-1.2.4-3.fc30.x86_64.rpm:
759 Likewise.
760 * tests/data/test-diff-pkg/PR24690/flatpak-libs-1.4.0-1.fc30.x86_64.rpm:
761 Likewise.
762 * tests/data/test-diff-pkg/PR24690/flatpak-libs-debuginfo-1.2.4-3.fc30.x86_64.rpm:
763 Likewise.
764 * tests/data/test-diff-pkg/PR24690/flatpak-libs-debuginfo-1.4.0-1.fc30.x86_64.rpm:
765 Likewise.
766 * tests/data/test-diff-pkg/PR24690/PR24690-report-0.txt: New test
767 reference output.
768 * tests/data/Makefile.am: Add the new test material above to
769 source distribution.
770 * tests/test-diff-pkg.cc (in_out_specs): Add the new test material
771 above to this test harness.
772
7732019-11-26 Dodji Seketeli <dodji@redhat.com>
774
775 Small style fix in abg-default-reporter.cc
776 * src/abg-default-reporter.cc (default_reporter::report): In the
777 overload for corpus_diff, break a line longer than 80 characters.
778
7792019-10-21 Matthias Maennich <maennich@google.com>
780
781 dwarf-reader: add support for symbol namespaces in ksymtab entries
782 * src/abg-dwarf-reader.cc
783 (read_context::try_reading_first_ksymtab_entry): Add
784 symbol_offset parameter.
785 (read_context::get_ksymtab_entry_size): Add support for variable
786 size ksymtab entries due to symbol namespaces.
787 (load_kernel_symbol_table): only load nb_entries when needed
788 [1] https://lore.kernel.org/lkml/20190906103235.197072-1-maennich@google.com/
789
7902019-10-21 Matthias Maennich <maennich@google.com>
791
792 dwarf-reader: refactor try_reading_first_ksymtab_entry_using{pre,}_v4_19_format
793 * src/abg-dwarf-reader.cc(try_reading_first_ksymtab_entry):
794 New function to consolidate functionality for
795 try_reading_first_ksymtab_entry_using_{pre,}v4_19_format functions.
796 (try_reading_first_ksymtab_entry_using_v4_19_format,
797 try_reading_first_ksymtab_entry_using_pre_v4_19_format):
798 refactor to use try_reading_first_ksymtab_entry
799
8002019-10-28 Dodji Seketeli <dodji@redhat.com>
801
802 Bug 25128 - Handle decl-only classes that differ only in size
803 * include/abg-comp-filter.h (is_decl_only_class_with_size_change):
804 Declare an overload.
805 * include/abg-fwd.h (look_through_decl_only_class): Declare an
806 overload.
807 * src/abg-comp-filter.cc (is_decl_only_class_with_size_change):
808 Define an overload that takes class_or_union& type. Re-write the
809 previous overload in terms of this new one.
810 * src/abg-ir.cc (look_through_decl_only_class): Define a new
811 overload that takes a class_or_union&. Rewrite the previous
812 overload in terms of this one.
813 (equals): In the overload for class_or_union&, use
814 is_decl_only_class_with_size_change to detect cases of decl-only
815 classes that differ only by their size attribute and avoid
816 comparing them.
817 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
818 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
819 * tests/data/test-diff-filter/test41-report-0.txt: Likewise.
820
8212019-10-24 Dodji Seketeli <dodji@redhat.com>
822
823 Bug 25128 - Leaf diff reporter shouldn't compare decl-only classes
824 * include/abg-comp-filter.h (is_decl_only_class_with_size_change):
825 Declare new function.
826 * src/abg-comp-filter.cc (is_decl_only_class_with_size_change):
827 Define new function.
828 * src/abg-comparison.cc
829 (leaf_diff_node_marker_visitor::visit_begin): Use the newly
830 defined is_decl_only_class_with_size_change above to ignore bogus
831 decl-only classes with a size change.
832 * tests/data/test-diff-suppr/test45-abi-report-1.txt: New test input.
833 * tests/data/test-diff-suppr/test45-abi-wl.xml: Likewise.
834 * tests/data/test-diff-suppr/test45-abi.xml: Likewise.
835 * tests/data/test-diff-suppr/test45-abi.suppr.txt: New reference
836 output for the test input above.
837 * tests/data/test-diff-suppr/test46-PR25128-base.xml: New test input.
838 * tests/data/test-diff-suppr/test46-PR25128-new.xml: Likewise.
839 * tests/data/test-diff-suppr/test46-PR25128-report-1.txt: New
840 reference input for the test input above.
841 * tests/data/Makefile.am: Add the new test material to source distribution.
842 * tests/test-diff-suppr.cc (in_out_spec): Add the new test input
843 above to this test harness.
844
8452019-10-18 Dodji Seketeli <dodji@redhat.com>
846
847 Bug 25095 - Apply symbol white lists to ELF symbols
848 * src/abg-tools-utils.cc (gen_suppr_spec_from_kernel_abi_whitelist):
849 Generate a suppression specification which considers the name of
850 the symbol associated to a function/variable, rather than just the
851 name of said function/variable.
852
8532019-10-18 Dodji Seketeli <dodji@redhat.com>
854
855 Support symbol_name_not_regexp in [suppress_{function, variable}]
856 * doc/manuals/libabigail-concepts.rst: Document the new
857 symbol_name_not_regexp properties for the
858 suppress_{function,variable} directives.
859 * include/abg-suppression.h
860 ({function,variable}_suppression::{g,s}et_symbol_name_not_regex_str):
861 Declare new member functions.
862 * src/abg-dwarf-reader.cc
863 (read_context::is_elf_symbol_suppressed): Define new member functions.
864 (read_context::{load_symbol_maps_from_symtab_section,
865 populate_symbol_map_from_ksymtab,
866 populate_symbol_map_from_ksymtab_reloc}): Drop suppressed symbols
867 when reading symbol tables.
868 ({function,variable}_is_suppressed): Consider that in C, the
869 linkage name is _by default_ the same as the function/variable
870 name. Remove local variable.
871 * include/abg-ir.h (elf_symbol_is_{function,variable}): Add ...
872 * src/abg-ir.cc (elf_symbol_is_{function,variable}): ... new
873 functions.
874 * src/abg-reader.cc (build_elf_symbol): Take an additional boolean
875 to detect and drop suppressed symbols.
876 (build_elf_symbol_db): Adjust the call to build_elf_symbol to make
877 it detect and drop suppressed symbols.
878 (read_corpus_from_input): Be mindful that the set of symbols for a
879 given corpus can be empty because of suppression specifications.
880 * src/abg-suppression-priv.h
881 ({function,variable}_suppression::priv::symbol_name_not_regex[_str_]):
882 Add new data members.
883 (function,variable}_suppression::priv::get_symbol_name_not_regex):
884 Add new member functions.
885 ({function,variable}_is_suppressed): Guard against empty name.
886 (is_elf_symbol_suppressed): Define new function template.
887 * src/abg-suppression.cc
888 ({function,variable}_suppression::{g,s}et_symbol_name_not_regex_str):
889 Define new member functions.
890 ({function,variable}_suppression::suppresses_function)
891 (suppression_matches_{function,variable}_sym_name)
892 (read_{function,variable}_suppression): Support the new
893 "symbol_name_not_regex" property.
894 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp-report-1.txt:
895 New test reference report.
896 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp-report-2.txt:
897 Likewise.
898 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp-v{0,1}.c:
899 Sources of the new test input.
900 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp-v{0,1}.o:
901 New test input binaries.
902 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp-v{0,1}.o.abi:
903 New test input abixml files.
904 * tests/data/test-diff-suppr/test44-suppr-sym-name-not-regexp.suppr.txt:
905 Next test suppression specification.
906 * tests/data/Makefile.am: Add the new test material above to
907 source distribution.
908 * tests/test-diff-suppr.cc (in_out_specs): Add the input tests
909 above to the test harness.
910
9112019-10-24 Dodji Seketeli <dodji@redhat.com>
912
913 [abg-comparison.cc] Fix comments typo
914 * src/abg-comparison.cc
915 (leaf_diff_node_marker_visitor::visit_begin): Fix typo in comment.
916
9172019-10-04 Matthias Maennich <maennich@google.com>
918
919 kmidiff: fix help message
920 * tools/kmidiff.c (display_usage): add missing line breaks to
921 help text
922
9232019-10-04 Matthias Maennich <maennich@google.com>
924
925 dwarf-reader: read_corpus_from_elf: unconditionally load elf properties
926 * src/abg-dwarf-reader.cc (read_corpus_from_elf):
927 unconditionally load elf properties into context
928
9292019-10-04 Dodji Seketeli <dodji@redhat.com>
930
931 PR25058 - Better support fn DIEs referring to symbols using DW_AT_ranges
932 * src/abg-dwarf-reader.cc
933 (read_context::get_first_exported_fn_address_from_DW_AT_ranges):
934 Rename read_context::get_first_address_from_DW_AT_ranges into
935 this. Walk through the addresses referred to by the DW_AT_ranges
936 attribute until we find one that is for an exported function
937 symbol, rather than just picking the first address of the set.
938 (read_context::get_function_address): Adjust.
939
9402019-10-03 Dodji Seketeli <dodji@redhat.com>
941
942 PR25058 - Support decl DIEs referring to symbols using DW_AT_ranges
943 * src/abg-dwarf-reader.cc
944 (read_context::get_first_address_from_DW_AT_ranges): Define new
945 member function.
946 (read_context::get_function_address): Use the new
947 read_context::get_first_address_from_DW_AT_ranges here.
948 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
949 New reference test output.
950 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so: New test
951 input binary.
952 * tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so: New test
953 input binary.
954 * tests/data/Makefile.am: Add the new test materials above to
955 source distribution.
956 * tests/test-diff-dwarf.cc (in_out_specs): Add the new input test
957 input binary files to this test harness.
958
9592019-10-01 Dodji Seketeli <dodji@redhat.com>
960
961 Fix thinkos in DW_FORM_strx detection in configure.ac
962 * configure.ac: Fix thinko when setting the HAVE_DW_FORM_strx
963 macro.
964
9652019-10-01 Dodji Seketeli <dodji@redhat.com>
966
967 Fix a typo in a comment of abg-dwar-reader.cc
968 * src/abg-dwarf-reader.cc (compare_dies_string_attribute_value):
969 Fix a typo in the comment of this function.
970
9712019-09-30 Dodji Seketeli <dodji@redhat.com>
972
973 PR25042 - Support string form DW_FORM_strx{1,4} from DWARF 5
974 * configure.ac: Detect the presence of the DW_FORM_strx{1,4}
975 enumerators.
976 * src/abg-dwarf-reader.cc (form_is_DW_FORM_strx): Define new
977 function.
978 (compare_dies_string_attribute_value): Use the new
979 form_is_DW_FORM_strx here.
980 * tests/data/Makefile.am: Add the new test input files below to
981 source distribution.
982 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0:
983 New binary test input file.
984 * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
985 Reference output of the new binary test input file.
986 * tests/test-read-dwarf.cc (in_out_specs): Add the input test
987 files above to the test harness, for platforms that support the
988 DW_FORM_strx form.
989
9902019-09-04 Dodji Seketeli <dodji@redhat.com>
991
992 Support the "name_not_regexp" property in the [suppress_type] section
993 * doc/manuals/libabigail-concepts.rst: Update this to document the
994 new name_not_regexp property of the suppress_type directive.
995 * include/abg-suppression.h
996 (type_suppression::{g,s}et_type_name_not_regex_str): Declare new accessors.
997 * src/abg-suppression-priv.h
998 (type_suppression::priv::{type_name_not_regex_str_,
999 type_name_not_regex_}): Define new data members.
1000 (type_suppression::priv::{get_type_name_not_regex,
1001 set_type_name_not_regex, get_type_name_not_regex_str,
1002 set_type_name_not_regex_str}): Define new member functions.
1003 * src/abg-suppression.cc
1004 (type_suppression::get_type_name_regex_str): Fix comments.
1005 (type_suppression::{set_type_name_not_regex_str,
1006 get_type_name_not_regex_str}): Define new data members.
1007 (suppression_matches_type_name): Adapt to support the new
1008 type_name_not_regex property.
1009 (read_type_suppression): Support parsing the type_name_not_regexp
1010 property.
1011 * tests/data/test-diff-suppr/test42-negative-suppr-type-report-0.txt:
1012 New test reference output.
1013 * tests/data/test-diff-suppr/test42-negative-suppr-type-report-1.txt: Likewise.
1014 * tests/data/test-diff-suppr/test42-negative-suppr-type-suppr-1.txt:
1015 New test input.
1016 * tests/data/test-diff-suppr/test42-negative-suppr-type-suppr-2.txt: Likewise.
1017 * tests/data/test-diff-suppr/test42-negative-suppr-type-v0.{cc, o}: Likewise.
1018 * tests/data/test-diff-suppr/test42-negative-suppr-type-v1.{cc,
1019 o}: Likewise.
1020 * tests/data/Makefile.am: Add the test files above to source
1021 distribution.
1022 * tests/test-diff-suppr.cc (int_out_specs): Add the new tests to
1023 the harness.
1024
10252019-09-04 Dodji Seketeli <dodji@redhat.com>
1026
1027 Better propagation of suppressed-ness to function types
1028 * src/abg-comparison.cc
1029 (suppression_categorization_visitor::visit_end): Propagate
1030 suppression-ness from suppressed function type diff node to its
1031 parent function node if the latter doesn't have any local non-type
1032 change.
1033 * tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-report-1.txt:
1034 New test reference output.
1035 * tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-suppr-1.txt:
1036 New test input suppression file.
1037 * tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v{0,1}.cc:
1038 Source code of input binary file.
1039 * tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v{0,1}.o:
1040 Input binary files.
1041 * tests/data/Makefile.am: Add the new test input files above to
1042 source distribution.
1043 * tests/test-diff-suppr.cc (in_out_specs): Add the test input to
1044 test harness.
1045
10462019-09-04 Dodji Seketeli <dodji@redhat.com>
1047
1048 [has_type_change] Better detect type size changes
1049 * src/abg-comp-filter.cc (has_type_change): Support function
1050 parameters.
1051
10522019-09-23 Dodji Seketeli <dodji@redhat.com>
1053
1054 Fix reading of relocation sections when endianness mismatches
1055 * src/abg-dwarf-reader.cc
1056 (read_context::{get_ksymtab_format_module,
1057 populate_symbol_map_from_ksymtab_reloc}): Use elf_getdata rather
1058 than elf_rawdata.
1059
10602019-09-20 Dodji Seketeli <dodji@redhat.com>
1061
1062 Guard testing v4.19+ AARCH64 kernel module loading for EL6 support
1063 * tests/test-read-dwarf.cc: Do not run the test on
1064 PR25007-sdhci.ko if the macros R_AARCH64_PREL32 and
1065 R_AARCH64_ABS64 are not defined.
1066
10672019-09-19 Dodji Seketeli <dodji@redhat.com>
1068
1069 Remove the elf_symbol::get_value property
1070 * include/abg-ir.h (elf_symbol::{elf_symbol, create}): Remove the
1071 'val' parameter.
1072 * src/abg-dwarf-reader.cc (elf_symbol::get_value): Remove this
1073 member function declaration.
1074 (lookup_symbol_from_sysv_hash_tab)
1075 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
1076 (create_default_var_sym, create_default_fn_sym)
1077 (read_context::lookup_elf_symbol_from_index): Adjust calls to
1078 creating elf_symbol instances.
1079 * src/abg-ir.cc (elf_symbol::priv::value_): Remove this data
1080 member.
1081 (elf_symbol::{priv::priv, elf_symbol, create): Adjust.
1082 * src/abg-reader.cc (build_elf_symbol): Likewise.
1083
10842019-09-19 Dodji Seketeli <dodji@redhat.com>
1085
1086 Bug 25007 - Don't use section-relative symbol values on ET_REL binaries
1087 * src/abg-dwarf-reader.cc
1088 (read_context::{lookup_native_elf_symbol_from_index,
1089 maybe_adjust_et_rel_sym_addr_to_abs_addr}): Define new member
1090 functions.
1091 (read_context::lookup_elf_symbol_from_index): Add a new overload.
1092 Write the old overloads in terms of the new one.
1093 (read_context::{load_symbol_maps_from_symtab_section,
1094 populate_symbol_map_from_ksymtab_reloc}): Use the new
1095 maybe_adjust_et_rel_sym_addr_to_abs_addr function to translate the
1096 symbol value/address into a binary-relative address before adding
1097 it to the addr->sym maps.
1098 (read_context::maybe_adjust_{fn, var}_sym_address): Do not adjust
1099 DWARF-referred-to addresses of ET_REL symbols anymore.
1100 * tests/data/test-read-dwarf/PR25007-sdhci.ko: New binary test input.
1101 * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: ABI
1102 representation of the above.
1103 * tests/test-read-dwarf.cc: Add the new test input to the harness.
1104 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Adjust.
1105 * tests/data/test-diff-filter/test20-inline-report-0.txt: Likewise.
1106 * tests/data/test-diff-filter/test20-inline-report-1.txt: Likewise.
1107 * tests/data/test-diff-filter/test41-report-0.txt: Likewise.
1108 * tests/data/test-diff-filter/test9-report.txt: Likewise.
1109
11102019-09-18 Dodji Seketeli <dodji@redhat.com>
1111
1112 Detect the presence of R_AARCH64_{ABS64, PREL32} macros
1113 * configure.ac: Define macros HAVE_R_AARCH64_{ABS64, PREL32}_MACRO
1114 if the macros R_AARCH64_{ABS64, PREL32} are present.
1115 * src/abg-dwarf-reader.cc
1116 (read_context::get_ksymtab_format_module): Conditionalize the use
1117 of R_AARCH64_{ABS64, PREL32} using HAVE_R_AARCH64_{ABS64, PREL32}_MACRO.
1118
11192019-09-03 Jessica Yu <jeyu@kernel.org>
1120
1121 Support pre and post v4.19 ksymtabs for Linux kernel modules
1122 * include/abg-ir.h (elf_symbol::{elf_symbol, create}): Take new
1123 symbol value and shndx parameters.
1124 (elf_symbol::{get_value, get_shndx}): Declare new accessors.
1125 * src/abg-ir.cc (elf_symbol::priv::{value_, shndx_}): New data
1126 members.
1127 (elf_symbol::priv::priv): Adjust.
1128 (elf_symbol::elf_symbol): Take new value and is_linux_string_cst
1129 parameters.
1130 (elf_symbol::create): Likewise.
1131 (elf_symbol::{get_value, get_is_linux_string_cst}): Define new
1132 accessors.
1133 * src/abg-reader.cc (build_elf_symbol): Adjust.
1134 * src/abg-dwarf-reader.cc (binary_is_linux_kernel)
1135 (binary_is_linux_kernel): New static functions.
1136 (lookup_symbol_from_sysv_hash_tab)
1137 (lookup_symbol_from_gnu_hash_tab)
1138 (lookup_symbol_from_symtab): Adjust.
1139 (read_context::{ksymtab_reloc_section_,
1140 ksymtab_gpl_reloc_section_, ksymtab_strings_section_}): New data
1141 members.
1142 (read_context::read_context): Initialize ksymtab_reloc_section_,
1143 ksymtab_gpl_reloc_section_, ksymtab_strings_section_.
1144 (read_context::{find_ksymtab_reloc_section,
1145 find_ksymtab_gpl_reloc_section, find_ksymtab_strings_section,
1146 find_any_ksymtab_reloc_section, get_ksymtab_format_module,
1147 populate_symbol_map_from_ksymtab,
1148 populate_symbol_map_from_ksymtab_reloc, is_linux_kernel_module}):
1149 New member functions.
1150 (read_context::load_kernel_symbol_table): Adjust to call either
1151 populate_symbol_map_from_ksymtab{_reloc,} depending on ksymtab
1152 format.
1153 (read_context::get_ksymtab_format): Adjust to call
1154 get_ksymtab_format_module for linux kernel modules.
1155 (read_context::lookup_elf_symbol_from_index): Adjust.
1156 (create_default_var_sym, create_default_fn_sym): Adjust.
1157
11582019-08-02 Dodji Seketeli <dodji@redhat.com>
1159
1160 Serialize canonical types to avoid testing if types have been emitted
1161 * include/abg-fwd.h (is_decl_slow)
1162 (peel_pointer_or_reference_type): Declare new functions.
1163 * include/abg-ir.h (struct canonical_type_hash): Define new type.
1164 (type_base_ptr_set_type, type_base_ptrs_type)
1165 (type_base_sptrs_type, canonical_type_sptr_set_type): Define new
1166 typedefs.
1167 (environment::get_canonical_types_map): Declare new member
1168 function.
1169 (scope_decl::{get_canonical_types, get_sorted_canonical_types}):
1170 Declare new member functions.
1171 * src/abg-ir.cc (is_ptr_ref_or_qual_type)
1172 (peel_pointer_or_reference_type, is_decl_slow): Define new
1173 functions.
1174 (environment::{get_canonical_types_map}): Define new member
1175 functions.
1176 (canonical_type_hash::operator()): Likewise.
1177 (scope_decl::{get_canonical_types, get_sorted_canonical_types}):
1178 Likewise.
1179 (struct type_topo_comp): Define new comparison functor type.
1180 (environment::{sorted_canonical_types_}): Define new data member.
1181 (scope_decl::priv::{canonical_types_, sorted_canonical_types_}):
1182 Likewise.
1183 (scope_decl::is_empty): Take the presence of canonical types into
1184 account when determining if a scope is empty or not.
1185 (is_decl): Make this work for cases where the artifact at hand is
1186 a type which has a declaration, as opposed to being a pure
1187 declaration like a variable or a function.
1188 (canonicalize): Add the canonical type the list of canonical types
1189 of its scope.
1190 * src/abg-dwarf-reader.cc (read_context::die_is_in_cplus_plus):
1191 Define new member function.
1192 * src/abg-writer.cc (write_type, write_canonical_types_of_scope):
1193 Define new static functions.
1194 (fn_type_ptr_set_type): Define new typedef.
1195 (write_context::{m_referenced_fn_types_set,
1196 m_referenced_non_canonical_types_set}): Add new data members.
1197 (write_context::m_referenced_types_set): Renamed
1198 m_referenced_types_map into this.
1199 (write_context::get_referenced_types): Adjust.
1200 (write_context::get_referenced_{function_types,
1201 non_canonical_types}):
1202 (write_context::record_type_as_referenced): Adjust to add the
1203 referenced type in the proper set which would be one of the three
1204 following: write_context::{get_referenced_types,
1205 get_referenced_function_types,
1206 get_referenced_non_canonical_types}.
1207 (write_context::{type_is_referenced, clear_referenced}): Adjust.
1208 (write_translation_unit): Use the new
1209 write_canonical_types_of_scope. Also emit declaration-only
1210 classes that have member types. Do not test if a given type of a
1211 given scope has been emitted, in general, as this was super slow
1212 given the number of types. Emit referenced function types (as
1213 these don't belong to any scope). Rather than using the expensive
1214 "is_function_type" on *all* the referenced types, just walk the
1215 set write_context::get_referenced_function_types. Likewise,
1216 rather than using type_base::get_naked_canonical_type on
1217 *all* the referenced types, just walk the set
1218 write_context::get_referenced_non_canonical_types
1219 (write_class): Use write_canonical_types_of_scope here.
1220 * tools/abilint.cc (main): Support linting corpus group abixml
1221 files.
1222 * tests/data/test-annotate/libtest23.so.abi: Adjust.
1223 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
1224 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
1225 * tests/data/test-annotate/test-anonymous-members-0.o.abi: Likewise.
1226 * tests/data/test-annotate/test0.abi: Likewise.
1227 * tests/data/test-annotate/test1.abi: Likewise.
1228 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
1229 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
1230 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
1231 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
1232 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
1233 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
1234 * tests/data/test-annotate/test2.so.abi: Likewise.
1235 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
1236 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
1237 * tests/data/test-annotate/test4.so.abi: Likewise.
1238 * tests/data/test-annotate/test6.so.abi: Likewise.
1239 * tests/data/test-annotate/test7.so.abi: Likewise.
1240 * tests/data/test-annotate/test8-qualified-this-pointer.so.abi: Likewise.
1241 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Likewise.
1242 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
1243 * tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi: Likewise.
1244 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
1245 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Likewise.
1246 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
1247 * tests/data/test-read-dwarf/test0.abi: Likewise.
1248 * tests/data/test-read-dwarf/test1.abi: Likewise.
1249 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
1250 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
1251 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
1252 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
1253 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
1254 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
1255 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
1256 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
1257 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
1258 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
1259 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
1260 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
1261 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
1262 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
1263 * tests/data/test-read-dwarf/test4.so.abi: Likewise.
1264 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
1265 * tests/data/test-read-dwarf/test7.so.abi: Likewise.
1266 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Likewise.
1267 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
1268 * tests/data/test-read-write/test10.xml: Likewise.
1269 * tests/data/test-read-write/test14.xml: Likewise.
1270 * tests/data/test-read-write/test15.xml: Likewise.
1271 * tests/data/test-read-write/test17.xml: Likewise.
1272 * tests/data/test-read-write/test18.xml: Likewise.
1273 * tests/data/test-read-write/test19.xml: Likewise.
1274 * tests/data/test-read-write/test2.xml: Likewise.
1275 * tests/data/test-read-write/test20.xml: Likewise.
1276 * tests/data/test-read-write/test21.xml: Likewise.
1277 * tests/data/test-read-write/test22.xml: Likewise.
1278 * tests/data/test-read-write/test23.xml: Likewise.
1279 * tests/data/test-read-write/test24.xml: Likewise.
1280 * tests/data/test-read-write/test25.xml: Likewise.
1281 * tests/data/test-read-write/test26.xml: Likewise.
1282 * tests/data/test-read-write/test27.xml: Likewise.
1283 * tests/data/test-read-write/test28-without-std-fns-ref.xml: Likewise.
1284 * tests/data/test-read-write/test28-without-std-vars-ref.xml: Likewise.
1285 * tests/data/test-read-write/test3.xml: Likewise.
1286 * tests/data/test-read-write/test6.xml: Likewise.
1287
12882019-07-24 Matthias Maennich <maennich@google.com>
1289
1290 abg-dwarf-reader: detect kernel modules without exports as such
1291 * src/abg-dwarf-reader.cc(is_linux_kernel_binary): consider
1292 binaries only having a .modinfo section to be kernel binaries
1293 Co-developed-by: Alessio Balsini <balsini@android.com>
1294
12952019-07-22 Matthias Maennich <maennich@google.com>
1296
1297 Ensure a consistent C++ standard use
1298 * configure.ac: add -std=c++11 flag to CXXFLAGS when compiling
1299 for C++11
1300 * src/Makefile.am: drop now obsolete setting of the -std flag
1301 * tests/Makefile.am: likewise
1302 Reported-by: Chun-Hung Wu <Chun-hung.Wu@mediatek.com>
1303
13042019-07-19 Dodji Seketeli <dodji@redhat.com>
1305
1306 Bug 24787 - Filter out enum changes into compatible integer types
1307 * include/abg-comparison.h (peel_typedef_or_qualified_type_diff):
1308 Declare new function.
1309 (peel_pointer_or_qualified_type_diff): Rename
1310 peel_pointer_or_qualified_type into this.
1311 * include/abg-fwd.h (is_enum_type): Declare a new overload for
1312 type_or_decl_base*.
1313 * src/abg-comp-filter.cc (has_harmless_enum_to_int_change): Define
1314 new static function.
1315 * src/abg-comparison.cc (categorize_harmless_diff_node): Use the
1316 new has_harmless_enum_to_int_change here.
1317 (peel_pointer_or_qualified_type_diff): Renamed
1318 peel_pointer_or_qualified_type into this.
1319 (is_diff_of_basic_type): Adjust.
1320 (peel_typedef_or_qualified_type_diff): Define new function.
1321 * test-diff-filter/PR24787-lib{one, two}.so: New test input
1322 binaries.
1323 * test-diff-filter/PR24787-{one, two}.c: Source files of the test
1324 input binaries above.
1325 * test-diff-filter/PR24787-report-0.txt: Test output reference.
1326 * tests/data/Makefile.am: Add the new testing material to source
1327 distribution.
1328 * tests/test-diff-filter.cc (in_out_specs): Add the new test to
1329 the test harness.
1330
13312019-07-19 Dodji Seketeli <dodji@redhat.com>
1332
1333 Add timing to the verbose logs of abidw
1334 * include/abg-tools-utils.h (class timer): Declare new type.
1335 (operator<<(ostream&, const timer&)): Declare new streaming
1336 operator for the new timer type.
1337 * src/abg-tools-utils.cc (struct timer::priv): Define new type.
1338 (timer::{timer, start, stop, value_in_seconds, value,
1339 value_as_string, ~timer}): Define member functions.
1340 (operator<<(ostream& o, const timer& t)): Define streaming
1341 operator.
1342 (build_corpus_group_from_kernel_dist_under): Add timing logs to
1343 the linux kernel reading process.
1344 * src/abg-dwarf-reader.cc
1345 (read_context::canonicalize_types_scheduled): Add timing logs to
1346 type canonicalization.
1347 (read_debug_info_into_corpus): Add timing logs for the whole debug
1348 info loading and internal representation building process.
1349 * tools/abidw.cc (load_corpus_and_write_abixml): Add timing logs
1350 for the binary loading and serizalization process.
1351 (load_kernel_corpus_group_and_write_abixml): Add timing logs the
1352 Linux Kernel binary loading and writing process.
1353
13542019-07-18 Dodji Seketeli <dodji@redhat.com>
1355
1356 [ir] Fix indentation and add comments
1357 * src/abg-ir.cc (types_defined_same_linux_kernel_corpus_public):
1358 Fix indentation and add comments.
1359
13602019-07-15 Dodji Seketeli <dodji@redhat.com>
1361
1362 Implement fast comparison of Linux Kernel types when applicable
1363 * include/abg-corpus.h (corpus::origin): Add a new
1364 LINUX_KERNEL_BINARY_ORIGIN enumerator.
1365 (corpus::{s,g}et_group): Declare new member
1366 functions.
1367 (class corpus): Make the corpus_group class friend of this one.
1368 (corpus_group::get_main_corpus): Declare new member function.
1369 * src/abg-corpus-priv.h (corpus::priv::group): Define new data
1370 member.
1371 (corpus::priv::priv): Initialize the new corpus::priv::group data
1372 member.
1373 * src/abg-corpus.cc (corpus::{g,s}et_group): Define new member
1374 functions.
1375 (corpus_group::get_main_corpus): Likewise.
1376 (corpus_group::add_corpus): Use the new corpus::set_group() here
1377 to to make the corpus be aware of the group it belongs to.
1378 * src/abg-dwarf-reader.cc (read_debug_info_into_corpus): Set the
1379 current corpus origin to the corpus::LINUX_KERNEL_BINARY_ORIGIN if
1380 we are looking at a Linux Kernel binary.
1381 (read_context::main_corpus_from_current_group): Use the
1382 corpus_group::get_main_corpus method.
1383 (should_reuse_type_from_corpus_group): Return the corpus group,
1384 rather than the main corpus.
1385 (read_debug_info_into_corpus): Add the current corpus to the
1386 current corpus group before the debug info reading is done. That
1387 way, the corpus group will be accessible from the current corpus
1388 during the construction of the internal representation.
1389 (read_and_add_corpus_to_group_from_elf): Add the corpus to the
1390 group only if it wasn't added to it before.
1391 * include/abg-ir.h (operator{==,!=}): Declare new deep equality
1392 and inequality operators for class_or_union_sptr and
1393 union_decl_sptr.
1394 * src/abg-ir.cc (types_defined_same_linux_kernel_corpus_public):
1395 Define a new static function.
1396 (type_base::get_canonical_type_for): Use the new
1397 types_defined_same_linux_kernel_corpus_public here to speed up
1398 type comparison.
1399 (equals): In the overload of class_or_union, use the new
1400 types_defined_same_linux_kernel_corpus_public as well, to speed up
1401 type comparison.
1402 (operator{==,!=}): Define new deep equality and inequality
1403 operators for class_or_union_sptr and union_decl_sptr.
1404 (maybe_update_types_lookup_map): In the overload function for
1405 type_decl_sptr, class_decl_sptr, union_decl_sptr,
1406 enum_type_decl_sptr, typedef_decl_sptr, qualified_type_def_sptr,
1407 reference_type_def_sptr, array_type_def_sptr,
1408 array_type_def::subrange_sptr, and function_type_sptr, update the
1409 type lookup maps of the containing corpus group as well, not just
1410 the ones of the current corpus.
1411 * src/abg-reader.cc (build_enum_type_decl): Forgot to set the
1412 "is-anonymous" flag. Oops, fix this.
1413 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
1414 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
1415 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
1416 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
1417 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
1418
14192019-07-09 Matthias Maennich <maennich@google.com>
1420
1421 abg-tools-utils: add missing header include guards
1422 * include/abg-tools-utils.h: add header include guards
1423
14242019-07-05 Matthias Maennich <maennich@google.com>
1425
1426 Add compatibility layer for C++11 mode
1427 * include/abg-cxx-compat.h: new file introducing the abg_compat
1428 namespace to provide C++11 functionality from either std::tr1
1429 or std::
1430 * include/Makefile.am: Add the new abg-cxx-compat.h to source
1431 distribution.
1432 * include/abg-comparison.h: replace std::tr1 usage by abg_compat
1433 and adjust includes accordingly: likewise
1434 * include/abg-diff-utils.h: likewise
1435 * include/abg-fwd.h: likewise
1436 * include/abg-ini.h: likewise
1437 * include/abg-interned-str.h: likewise
1438 * include/abg-ir.h: likewise
1439 * include/abg-libxml-utils.h: likewise
1440 * include/abg-libzip-utils.h: likewise
1441 * include/abg-reporter.h: likewise
1442 * include/abg-sptr-utils.h: likewise
1443 * include/abg-suppression.h: likewise
1444 * include/abg-tools-utils.h: likewise
1445 * include/abg-workers.h: likewise
1446 * src/abg-comp-filter.cc: likewise
1447 * src/abg-comparison-priv.h: likewise
1448 * src/abg-corpus.cc: likewise
1449 * src/abg-dwarf-reader.cc: likewise
1450 * src/abg-hash.cc: likewise
1451 * src/abg-ir.cc: likewise
1452 * src/abg-reader.cc: likewise
1453 * src/abg-suppression.cc: likewise
1454 * src/abg-tools-utils.cc: likewise
1455 * src/abg-writer.cc: likewise
1456 * tests/test-diff-filter.cc: likewise
1457 * tests/test-diff-pkg.cc: likewise
1458 * tests/test-read-dwarf.cc: likewise
1459 * tests/test-read-write.cc: likewise
1460 * tests/test-types-stability.cc: likewise
1461 * tests/test-write-read-archive.cc: likewise
1462 * tools/abicompat.cc: likewise
1463 * tools/abidiff.cc: likewise
1464 * tools/abidw.cc: likewise
1465 * tools/abilint.cc: likewise
1466 * tools/abipkgdiff.cc: likewise
1467
14682019-07-05 Matthias Maennich <maennich@google.com>
1469
1470 Update tests/.gitignore to ignore runtesttoolsutils
1471 * tests/.gitignore: ignore runtesttoolsutils
1472
14732019-07-05 Matthias Maennich <maennich@google.com>
1474
1475 Drop requirement to compile with GNU extensions
1476 * include/abg-tools-utils.h (get_stream): Change return type to
1477 std::fstream
1478 * src/abg-corpus.cc: remove unused #include of ext/stdio_filebuf.h
1479 * src/abg-tools-utils (temp_file::priv): remove filebuf_ member,
1480 and replace iostream_ by fstream_ with changing the shared_ptr
1481 type accordingly
1482 (temp_file::priv::priv): initialize fstream_ based on
1483 temporary file name
1484 (temp_file::priv::~priv): adjust destruction accordingly
1485 (temp_file::is_good): test the fstream rather than the fd
1486 (temp_file::get_stream): adjust return type to std::fstream
1487 and adjust implementation based on the changes in temp_file::priv
1488 * src/Makefile.am: remove gnu extension from c++ standard flag
1489 * tests/Makefile.am: likewise
1490
14912019-07-09 Dodji Seketeli <dodji@redhat.com>
1492
1493 Misc indent cleanup
1494 * src/abg-dwarf-reader.cc (addr_elf_symbol_sptr_map_sptr): Fix a
1495 typo in the comment of this typedef.
1496 * src/abg-ir.cc (hash_type_or_decl): Fix typo in a comment.
1497 * src/abg-writer.cc (write_translation_unit): Remove useless
1498 vertical space.
1499
15002019-07-08 Dodji Seketeli <dodji@redhat.com>
1501
1502 [xml-writer] Remove a useless kludge
1503 * src/abg-writer.cc (write_context::type_is_emitted): Remove
1504 useless kludge from here.
1505
15062019-07-08 Dodji Seketeli <dodji@redhat.com>
1507
1508 [xml-writter] Speedup function_type::get_cached_name
1509 * src/abg-ir.cc (function_type::get_cached_name): Really cache the
1510 computed name of function_type instances.
1511
15122019-07-08 Dodji Seketeli <dodji@redhat.com>
1513
1514 [xml-writter] Avoid using RTTI when dynamically hashing types
1515 * include/abg-fwd.h (hash_type): Declare new function.
1516 * src/abg-ir.cc (hash_type): Define new function.
1517 * src/abg-writer.cc (type_hasher::operator()): Use the new
1518 hash_type rather than the old hash_type_or_decl.
1519
15202019-07-08 Dodji Seketeli <dodji@redhat.com>
1521
1522 Implement a poor-man's RTTI for performance
1523 * include/abg-fwd.h (is_type_decl): Replace the overloads
1524 that takes a type_base* and/or a decl_base* by one that takes a
1525 type_or_decl_base*.
1526 * include/abg-ir.h (type_or_decl_base::type_or_decl_kind): Define
1527 new enum.
1528 (type_or_decl_base::{kind, runtime_type_instance,
1529 type_or_decl_base_pointer}): Declare new accessors.
1530 (operator{|,|=,&,&=): Declare new operators for the new
1531 type_or_decl_base::type_or_decl_kind enum.
1532 (global_scope::global_scope): Move the definition of this
1533 constructor to ...
1534 * src/abg-ir.cc (global_scope::global_scope): ... here.
1535 (type_or_decl_base::priv::{kind_, rtti_, type_or_decl_ptr_}):
1536 Add new data members.
1537 (type_or_decl_base::priv::priv): Take a
1538 type_or_decl_base::type_or_decl_kind enum.
1539 (type_or_decl_base::priv::kind): Define new accessors.
1540 (operator{|,|=,&,&=): Define new operators for the new
1541 type_or_decl_base::type_or_decl_kind enum.
1542 (type_or_decl_base::type_or_decl_base): Take a
1543 type_or_decl_base::type_or_decl_kind enum.
1544 (type_or_decl_base::{kind, runtime_type_instance,
1545 type_or_decl_base_pointer}): Define new accessors.
1546 (decl_base::decl_base, scope_decl::scope_decl)
1547 (type_base::type_base, scope_type_decl::scope_type_decl)
1548 (class_or_union::class_or_union) : Adjust to set the runtime type
1549 identifier of the instances of these types.
1550 (global_scope::global_scope, type_decl::type_decl)
1551 (qualified_type_def::qualified_type_def)
1552 (pointer_type_def::pointer_type_def)
1553 (reference_type_def::reference_type_def
1554 array_type_def::subrange_type::subrange_type)
1555 (array_type_def::array_type_def, enum_type_decl::enum_type_decl)
1556 (typedef_decl::typedef_decl, var_decl::var_decl)
1557 (function_type::function_type, method_type::method_type)
1558 (function_decl::function_decl)
1559 (function_decl::parameter::parameter, method_decl::method_decl)
1560 (class_decl::class_decl, class_decl::base_spec::base_spec)
1561 (union_decl::union_decl, template_decl::template_decl)
1562 (type_tparameter::type_tparameter)
1563 (non_type_tparameter::non_type_tparameter)
1564 (template_tparameter::template_tparameter)
1565 (type_composition::type_composition)
1566 (function_tdecl::function_tdecl, function_tdecl::function_tdecl)
1567 (class_tdecl::class_tdecl):
1568 Likewise and call runtime_type_instance() here to set the runtime
1569 type instance pointers of the current instance.
1570 (is_decl, is_type, is_class_type, is_pointer_type): Adjust to use
1571 the new poor-man's rtti machinery.
1572 (is_type_decl): Replace the overloads that takes a type_base*
1573 and/or a decl_base* by one that takes a type_or_decl_base*.
1574 (pointer_type_def::operator==, class_decl::operator==): Use the
1575 poor-man's rtti machinery to replace dynamic_cast.
1576 hash_type_or_decl: Replace dynamic_cast<const type_base> by
1577 is_type() and dynamic_cast<const decl_base*> by is_decl().
1578
15792019-07-05 Dodji Seketeli <dodji@redhat.com>
1580
1581 [dwarf-reader] Make sure to canonicalize anonymous types
1582 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Add two new
1583 overloads. One that takes type_base_sptr, one that takes a
1584 Dwarf_Die* and type_base_sptr. These force canonicalization for
1585 anonymous types.
1586 (build_function_type): Schedule function types for
1587 canonicalization.
1588 (build_ir_node_from_die): For struct/classes and unions, use the
1589 new overload of maybe_canonicalize_type to schedule
1590 canonicalization.
1591 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
1592 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
1593 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
1594 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
1595 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
1596
15972019-07-04 Dodji Seketeli <dodji@redhat.com>
1598
1599 [dwarf-reader] Constify the first parameter of maybe_canonicalize_type
1600 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Make the
1601 first parameter const.
1602 (read_context::{get_canonical_die, lookup_artifact_from_die,
1603 lookup_type_from_die, schedule_type_for_late_canonicalization}):
1604 Adjust.
1605
16062019-06-26 Dodji Seketeli <dodji@redhat.com>
1607
1608 Make abidiff --harmless show harmless changes in unions
1609 * include/abg-fwd.h (get_class_or_union_flat_representation): Add
1610 a "qualified_name" boolean parameter.
1611 * include/abg-ir.h ({type_or_decl_base, decl_base, type_decl,
1612 namespace_decl, array_type_def::subrange_type, array_type_def,
1613 enum_type_decl, typedef_decl, var_decl, function_decl,
1614 function_decl::parameter, function_type, method_type, class_decl,
1615 union_decl}::get_pretty_representation): Likewise.
1616 * src/abg-ir.cc ({type_or_decl_base, decl_base, type_decl,
1617 namespace_decl, array_type_def::subrange_type, array_type_def, enum_type_decl,
1618 typedef_decl, var_decl, function_decl, function_decl::parameter,
1619 function_type, method_type, class_decl, union_decl,
1620 }::get_pretty_representation): Adjust the code to emit qualified
1621 or non-qualified names depending on the new "qualified_name"
1622 boolean parameter.
1623 (get_class_or_union_flat_representation): Likewise.
1624 * src/abg-default-reporter.cc (default_reporter::report): Use
1625 get_class_or_union_flat_representation with the new
1626 "qualified_name" boolean set to false.
1627 * tests/data/test-diff-dwarf/test38-union-report-0.txt: Adjust.
1628 * tests/test-diff-filter.cc (in_out_specs): Run the test harness
1629 on test-PR24731-v{0,1}.o make abidiff use the --harmless option.
1630
16312019-06-26 Dodji Seketeli <dodji@redhat.com>
1632
1633 Bug 24731 - Wrongly reporting union members order change
1634 * include/abg-comp-filter.h (union_diff_has_harmless_changes):
1635 Declare new function and ...
1636 * src/abg-comp-filter.cc (union_diff_has_harmless_changes):
1637 ... define it here.
1638 (categorize_harmless_diff_node): Use the new
1639 union_diff_has_harmless_changes here.
1640 * include/abg-comparison.h (HARMLESS_UNION_CHANGE_CATEGORY): Add a
1641 new enumerator to diff_category enum. Adjust the value of the
1642 other enumerators.
1643 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
1644 Add the new HARMLESS_UNION_CHANGE_CATEGORY in here.
1645 (operator<<(ostream& o, diff_category c)): Support the new
1646 HARMLESS_UNION_CHANGE_CATEGORY.
1647 * tests/data/test-diff-filter/test-PR24731-report-0.txt: Likewise.
1648 * tests/data/test-diff-filter/test-PR24731-report-1.txt: Likewise.
1649 * tests/data/test-diff-filter/test-PR24731-v0.c: Likewise.
1650 * tests/data/test-diff-filter/test-PR24731-v0.o: Likewise.
1651 * tests/data/test-diff-filter/test-PR24731-v1.c: Likewise.
1652 * tests/data/test-diff-filter/test-PR24731-v1.o: Likewise.
1653 * tests/data/Makefile.am: Add the new test material above to
1654 source distribution.
1655 * tests/test-diff-filter.cc (in_out_spec): Add the new test input
1656 to this test harness.
1657
16582019-06-20 Dodji Seketeli <dodji@redhat.com>
1659
1660 Fully account for anonymous-ness of scopes when comparing decl names
1661 * include/abg-ir.h (decl_base::{get_has_anonymous_parent,
1662 set_has_anonymous_parent,
1663 get_is_anonymous_or_has_anonymous_parent}): Declare new member
1664 functions.
1665 * src/abg-ir.cc (decl_base::priv::has_anonymous_parent_): Define
1666 new data member.
1667 (decl_base::priv): Initialize the new data member.
1668 (decl_base::{get_has_anonymous_parent, set_has_anonymous_parent,
1669 get_is_anonymous_or_has_anonymous_parent}): Define new member
1670 functions.
1671 (equals): In the overload for decl_base, use the new
1672 decl_names_equal for decls that have anonymous scopes.
1673 (scope_decl::add_member_decl): Propagate the
1674 decl_base::has_anonymous_parent_ property.
1675 * include/abg-tools-utils.h
1676 (get_anonymous_struct_internal_name_prefix)
1677 (get_anonymous_union_internal_name_prefix)
1678 (get_anonymous_enum_internal_name_prefix, decl_names_equal):
1679 Declare new functions.
1680 * src/abg-comp-filter.cc (has_harmless_name_change): Handle the
1681 case where the name change is actually from an anonymous name to
1682 another one, using the new decl_names_equal function.
1683 * src/abg-dwarf-reader.cc
1684 (get_internal_anonymous_die_prefix_name): Renamed
1685 get_internal_anonynous_die_base_name into this. Use the new
1686 get_anonymous_{struct, union, enum}_internal_name_prefix functions
1687 here.
1688 (get_internal_anonymous_die_name, die_qualified_type_name)
1689 (build_enum_type, add_or_update_class_type)
1690 (add_or_update_union_type): Adjust.
1691 * src/abg-tools-utils.cc (get_anonymous_struct_internal_name_prefix)
1692 (get_anonymous_union_internal_name_prefix)
1693 (get_anonymous_enum_internal_name_prefix, decl_names_equal):
1694 Define new functions.
1695 * tests/test-tools-utils.cc: New test file.
1696 * tests/Makefile.am: Add new runtesttoolsutils test, built from
1697 test-tools-utils.cc.
1698 * tests/data/test-diff-dwarf/test46-rust-report-0.txt: Adjust.
1699 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
1700 Likewise.
1701 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
1702
17032019-06-12 Matthias Maennich <maennich@google.com>
1704
1705 abg-reporter.h: add missing includes / using declarations
1706 * include/abg-reporter.h: fix includes and using declarations
1707
17082019-06-17 Dodji Seketeli <dodji@redhat.com>
1709
1710 [dwarf-reader] Fix indentation in compare_dies_string_attribute_value
1711 * src/abg-dwarf-reader.cc (compare_dies_string_attribute_value):
1712 Fix indentation.
1713
17142019-06-17 Dodji Seketeli <dodji@redhat.com>
1715
1716 [dwarf-reader] Optimize speed of compare_as_decl_dies
1717 * src/abg-dwarf-reader.cc (die_is_class_type): Take a const
1718 pointer to Dwarf_Die.
1719 (compare_as_decl_dies): For classes/structs, call
1720 compare_dies_string_attribute_value just once to compare the
1721 DW_AT_name attribute values.
1722
17232019-06-13 Dodji Seketeli <dodji@redhat.com>
1724
1725 [dwarf-reader] Better use of linkage name for fn decl de-duplication
1726 * src/abg-dwarf-reader.cc (read_context::{die_is_in_c,
1727 die_is_in_c_or_cplusplus}): Define new member functions.
1728 (fn_die_equal_by_linkage_name): Define new static function.
1729 (compare_dies): In the case for for DW_TAG_subprogram, use the new
1730 fn_die_equal_by_linkage_name.
1731 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
1732 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
1733 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
1734 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
1735
17362019-06-13 Dodji Seketeli <dodji@redhat.com>
1737
1738 [dwarf-reader] Re-use function types inside a given TU
1739 * src/abg-dwarf-reader.cc (istring_fn_type_map_type): Declare new
1740 typedef.
1741 (die_is_function_type): Define new static function.
1742 (read_context::per_tu_repr_to_fn_type_maps_): Define new data
1743 member ...
1744 (read_context::per_tu_repr_to_fn_type_maps): ... and its accessor.
1745 (read_context::{associate_die_repr_to_fn_type_per_tu,
1746 lookup_fn_type_from_die_repr_per_tu}): Define new member
1747 functions.
1748 (build_function_type): Use the new
1749 read_context::lookup_fn_type_from_die_repr_per_tu and
1750 read_context::associate_die_repr_to_fn_type_per_tu functions,
1751 instead of read_context::lookup_type_from_die.
1752 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
1753 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
1754 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
1755 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
1756 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
1757 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
1758 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
1759
17602019-06-03 Dodji Seketeli <dodji@redhat.com>
1761
1762 [dwarf-reader] const-ify Dwarf_Die* use in many places
1763 * src/abg-dwarf-reader.cc (get_parent_die, get_scope_die)
1764 (die_is_anonymous, die_is_type, die_is_decl, die_is_namespace)
1765 (die_is_pointer_type, pointer_or_qual_die_of_anonymous_class_type)
1766 (die_is_reference_type, die_is_pointer_or_reference_type)
1767 (die_is_qualified_type, die_has_object_pointer)
1768 (die_is_at_class_scope, die_unsigned_constant_attribute)
1769 (die_signed_constant_attribute, die_attribute_is_signed)
1770 (die_attribute_is_unsigned, die_attribute_has_no_signedness)
1771 (die_name, die_location, die_qualified_type_name)
1772 (die_qualified_decl_name, die_qualified_name)
1773 (die_qualified_type_name_empty)
1774 (die_return_and_parm_names_from_fn_type_die)
1775 (die_function_signature, die_function_type_is_method_type)
1776 (die_pretty_print_type, die_pretty_print_decl, die_pretty_print)
1777 (maybe_canonicalize_type, build_subrange_type)
1778 (build_subranges_from_array_type_die, compare_dies)
1779 (read_context::get_container)
1780 (read_context::compute_canonical_die_offset)
1781 (read_context::get_or_compute_canonical_die)
1782 (read_context::get_die_source)
1783 (read_context::get_die_qualified_type_name)
1784 (read_context::get_die_pretty_representation)
1785 (read_context::get_die_language, read_context::odr_is_relevant)
1786 (read_context::set_canonical_die_offset)
1787 (read_context::associate_die_to_type, die_is_anonymous)
1788 (die_string_attribute, die_constant_attribute)
1789 (die_attribute_has_form, die_linkage_name)
1790 (die_decl_file_attribute, die_die_attribute, die_size_in_bits)
1791 (die_is_decl, die_is_namespace)
1792 (pointer_or_qual_die_of_anonymous_class_type, die_is_array_type)
1793 (die_is_pointer_reference_or_typedef_type)
1794 (die_peel_pointer_and_typedef, die_function_type_is_method_type)
1795 (die_virtuality, die_is_virtual)
1796 (compare_dies_string_attribute_value, compare_dies_cu_decl_file)
1797 (die_location_expr, die_member_offset)
1798 (get_internal_anonynous_die_base_name, compare_as_decl_dies)
1799 (compare_as_type_dies): Const-ify the Dwarf_Die* parameter(s) of
1800 these functions.
1801
18022019-06-05 Dodji Seketeli <dodji@redhat.com>
1803
1804 Take anonymous scopes into account when comparing decls
1805 * include/abg-interned-str.h (interned_string::clear): Add new
1806 member function.
1807 * src/abg-ir.cc (equals): In the overload for decl_base, consider
1808 the scope of the current (anonymous) decl. If that scope is
1809 anonymous then take that into account as well.
1810 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
1811 Adjust.
1812 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
1813
18142019-05-21 Matthias Maennich <maennich@google.com>
1815
1816 .clang-format: Add more options for match existing coding style
1817 * .clang-format: Add options for ConstructorInitializers
1818 Set SortUsingDeclarations=false
1819 Set AlignConsecutiveDeclarations=true
1820
18212019-05-21 Matthias Maennich <maennich@google.com>
1822
1823 .gitignore: Add libabigail-?.* *.orig files
1824 * .gitignore: add entries for distribution artifacts
1825 * .gitignore: add *.orig files
1826
18272019-05-21 Matthias Maennich <maennich@google.com>
1828
1829 abg-writer: drop deprecated API
1830 * include/abg-fwd.h (ABG_DEPRECATED): Remove this macro.
1831 * include/abg-writer.h (write_translation_unit, write_corpus)
1832 (write_corpus_group): Drop the deprecated overloads of these
1833 declarations.
1834 * src/abg-writer.cc (write_translation_unit, write_corpus)
1835 (write_corpus_group): Drop the deprecated overloads of these
1836 definitions.
1837
18382019-05-21 Matthias Maennich <maennich@google.com>
1839
1840 abidw: add option to only emit file names (--short-locs)
1841 * include/abg-writer.h (set_short_locs): Declare new function.
1842 (set_common_options): Use it.
1843 set_opts
1844 * src/abg-writer.cc (write_context::m_short_locs): New data
1845 member.
1846 (write_context::write_context): Initialize it.
1847 (write_context::{g,s}et_short_locs): Define new accessors.
1848 (write_location, write_translation_unit, write_corpus): Honour the
1849 new write_context::get_short_locs property.
1850 (set_short_locs): Define new function.
1851 * tools/abidw.cc (options::short_locs): New data member.
1852 (display_usage): Help string for the new --no-show-locs option.
1853 (parse_command_line): Parse the new --no-show-locs option.
1854
18552019-05-21 Matthias Maennich <maennich@google.com>
1856
1857 abidw: add option to omit the compilation directory
1858 * include/abg-writer.h (set_write_comp_dir): Declare new function.
1859 (set_common_options): Use it.
1860 * src/abg-writer.cc (write_context::m_write_comp_dir): Define new
1861 data member.
1862 (write_context::write_context): Initialize it.
1863 (write_context::{g,s}et_write_comp_dir): Define new member
1864 accessors.
1865 (set_write_comp_dir): Define new free-form getter.
1866 (write_translation_unit): Teach to respect write_comp_dir flag of
1867 write_context.
1868 * tools/abidw.cc (options::write_corpus_path): Define new data
1869 member.
1870 (options::options): Initialize it.
1871 (display_usage): Add doc string for a new command line option: --no-comp-dir-path.
1872 (parse_command_line): Parse the new command line option --no-comp-dir-path.
1873
18742019-05-21 Matthias Maennich <maennich@google.com>
1875
1876 Make write_architecture and write_corpus_path flags in the write_context
1877 * include/abg-writer.h (set_write_architecture)
1878 (set_write_corpus_path): Declare new getter functions.
1879 (write_corpus): Take a new "member_of_group" argument.
1880 (set_common_options): Use set_write_{architecture, corpus_path}
1881 here.
1882 * src/abg-writer.cc (write_context::m_write_{architecture,
1883 corpus_path}}): Add new data members.
1884 (write_context::write_context): Initialize the new data members.
1885 (write_context::{s,g}et_write_{architecture, corpus}): Define new
1886 accessors.
1887 (set_write_{architecture, corpus}): Define new free-form getter
1888 functions.
1889 (write_corpus): Add flag to make aware if written as part of a
1890 group.
1891 * tools/abidw.cc (load_corpus_and_write_abixml)
1892 (load_kernel_corpus_group_and_write_abixml): Drop obsolete option
1893 handling as xml_writer::set_common_options now takes care of it.
1894 ldiff --git a/include/abg-writer.h b/include/abg-writer.h
1895 index 200b5f7..729b455 100644
1896 --- a/include/abg-writer.h
1897 +++ b/include/abg-writer.h
1898 @@ -53,6 +53,11 @@ set_show_locs(write_context& ctxt, bool flag);
1899 void
1900 set_annotate(write_context& ctxt, bool flag);
1901 +void
1902 +set_write_architecture(write_context& ctxt, bool flag);
1903 +
1904 +void
1905 +set_write_corpus_path(write_context& ctxt, bool flag);
1906 /// A convenience generic function to set common options (usually used
1907 /// by Libabigail tools) from a generic options carrying-object, into
1908 @@ -69,6 +74,8 @@ set_common_options(write_context& ctxt, const OPTS& opts)
1909 {
1910 set_annotate(ctxt, opts.annotate);
1911 set_show_locs(ctxt, opts.show_locs);
1912 + set_write_architecture(ctxt, opts.write_architecture);
1913 + set_write_corpus_path(ctxt, opts.write_corpus_path);
1914 }
1915 void
1916 @@ -105,7 +112,10 @@ write_corpus_to_archive(const corpus_sptr corp,
1917 const bool annotate = false);
1918 bool
1919 -write_corpus(write_context& ctxt, const corpus_sptr& corpus, unsigned indent);
1920 +write_corpus(write_context& ctxt,
1921 + const corpus_sptr& corpus,
1922 + unsigned indent,
1923 + bool member_of_group = false);
1924 bool ABG_DEPRECATED
1925 write_corpus(const corpus_sptr& corpus, unsigned indent, write_context& ctxt);
1926
19272019-05-21 Matthias Maennich <maennich@google.com>
1928
1929 abidw: Consolidate setting options
1930 * include/abg-writer.h (set_common_option): Declare new function.
1931 * tools/abidw.cc (load_corpus_and_write_abixml)
1932 (load_kernel_corpus_group_and_write_abixml): Use the newly
1933 introduced set_common_option.
1934
19352019-05-21 Matthias Maennich <maennich@google.com>
1936
1937 write_context: allow mutating the ostream used
1938 * include/abg-writer.h (set_ostream): Declare new function.
1939 * src/abg-writer.cc (write_context::m_ostream): Make this data
1940 member be a pointer rather than a reference.
1941 (write_context::{write_context, get_ostream): Adjust. member.
1942 (write_context::set_ostream): Define new member function.
1943 (set_ostream): Define new free-form function.
1944 * tools/abidw.cc (load_corpus_and_write_abixml)
1945 (load_kernel_corpus_group_and_write_abixml): Use the feature of
1946 mutating the ostream and reuse the write_context in most cases.
1947
19482019-05-21 Matthias Maennich <maennich@google.com>
1949
1950 abg-writer: Refactor write_corpus_group API
1951 * include/abg-writer.h (write_corpus_group): Introduce new
1952 overload write_corpus_group(ctxt, corpus_group, indent) and
1953 deprecate all others.
1954 * src/abg-writer.cc (write_corpus_group): Likewise for the
1955 definitions and adjust.
1956 * tools/abidw.cc (load_kernel_corpus_group_and_write_abixml):
1957 Migrate to new API of write_corpus_group()
1958
19592019-05-21 Matthias Maennich <maennich@google.com>
1960
1961 abg-writer: Refactor write_corpus API
1962 * include/abg-writer.h (write_corpus): Introduce new overload
1963 write_corpus(ctxt, corpus, indent) and deprecate all others.
1964 * src/abg-writer.cc (write_corpus): Likewise for the definitions
1965 and adjust.
1966 * tests/test-read-dwarf.cc (test_task::perform): Use the new
1967 write_corpus which requires a write_context.
1968 * tools/abidw.cc (load_corpus_and_write_abixml, ): Likewise.
1969 * tools/abilint.cc (main): Likewise. Also simplify logic around the
1970 locations as they now can be expressed with less code.
1971
19722019-05-21 Matthias Maennich <maennich@google.com>
1973
1974 abg-writer: Refactor write_translation_unit API
1975 * include/abg-writer.h (write_translation_unit): Declare a new
1976 overload write_translation_unit(ctxt, tu, indent) and deprecate
1977 all others.
1978 * src/abg-writer.cc (write_translation_unit): Likewise in the
1979 definitions.
1980 (write_corpus, dump, write_translation_unit): Adjust.
1981 * tools/abilint.cc (main): use new write_translation_unit() API
1982
19832019-05-21 Matthias Maennich <maennich@google.com>
1984
1985 Add deprecation facilities
1986 * include/abg-fwd.h: Introduce deprecation macro ABG_DEPRECATED
1987
19882019-05-21 Matthias Maennich <maennich@google.com>
1989
1990 abg-writer: Simplify 'annotate' propagation
1991 * src/abg-writer.cc (write_context::write_context): remove
1992 'annotate' parameter.
1993 (write_translation_unit, write_corpus, write_corpus_group, dump): Adjust.
1994
19952019-05-15 Matthias Maennich <maennich@google.com>
1996
1997 Add .clang-format approximation
1998 * .clang-format: New File.
1999
20002019-05-16 Dodji Seketeli <dodji@redhat.com>
2001
2002 Bug 24552 - abidiff fails comparing a corpus against a corpus group
2003 * include/abg-corpus.h (corpus{_group}::get_{fun,
2004 var}_symbol_map): Make these member functions virtual.
2005 * src/abg-corpus.cc (corpus::lookup_{function, variable}_symbol):
2006 Use the virtual corpus::get_{fun, var}_symbol_map() member
2007 function to get the symbols of the current corpus or corpus_group.
2008 * tests/data/Makefile.am: Add the new test input material below to
2009 source distribution.
2010 * tests/data/test-abidiff/test-PR24552-report0.txt: New test input.
2011 * tests/data/test-abidiff/test-PR24552-v0.abi: Likewise.
2012 * tests/data/test-abidiff/test-PR24552-v1.abi: Likewise.
2013 * tests/test-abidiff.cc (main): Support comparing corpus groups.
2014 (specs): Add the new test inputs to the harness.
2015
20162019-05-15 Dodji Seketeli <dodji@redhat.com>
2017
2018 Bug 24560 - Assertion failure on an abixml with an anonymous type
2019 * src/abg-reader.cc (read_context::maybe_canonicalize_type): Delay
2020 canonicalization of union types too.
2021 (build_class_decl, build_union_decl): Do not try to re-use
2022 anonymous types.
2023
20242019-05-13 Dodji Seketeli <dodji@redhat.com>
2025
2026 Handle Linux kernel binaries with no __ksymtab section
2027 * src/abg-dwarf-reader.cc (find_section): Use elf_getshdrstrndx
2028 rather than poking at the elf header on our own.
2029 (read_context::find_any_ksymtab_section): Define new member
2030 function.
2031 (read_context::{get_symtab_format,
2032 try_reading_first_ksymtab_entry_using_pre_v4_19_format}): Use the
2033 new find_any_ksymtab_section rather than find_ksymtab_section.
2034 (read_context::get_nb_ksymtab_entries): Handle the absence of
2035 __ksymtab.
2036 (read_context::get_nb_ksymtab_gpl_entries): Handle the absence of
2037 __ksymtab_gpl.
2038 (read_context::load_kernel_symbol_table): Handle the case of zero
2039 ksymtab entries.
2040 (read_context::{maybe_adjust_address_for_exec_or_dyn,
2041 maybe_adjust_fn_sym_address, load_kernel_symbol_table}): Handle an
2042 address that is zero.
2043
20442019-05-10 Dodji Seketeli <dodji@redhat.com>
2045
2046 Fix logic of get_binary_load_address
2047 * src/abg-dwarf-reader.cc (get_binary_load_address): Consider the
2048 load address pointed to by the program header pointer returned by
2049 gelf_getphdr rather than the program header itself.
2050
20512019-05-10 maennich@google.com <maennich@google.com>
2052
2053 Bug 24431 Treat __ksymtab as int32_t for v4.19+ kernels
2054 * src/abg-dwarf-reader.cc (maybe_adjust_sym_address_from_v4_19_ksymtab):
2055 treat passed addr as 32bit signed offset in case of v4.19+ __ksymtabs
2056
20572019-05-10 maennich@google.com <maennich@google.com>
2058
2059 Bug 24431 Read 32bit values when testing for the v4.19 symbol table format
2060 * src/abg-dwarf-reader.cc
2061 (try_reading_first_ksymtab_entry_using_v4_19_format): attempt to
2062 read first __ksymtab entry into int32_t to preserve sign
2063
20642019-05-10 maennich@google.com <maennich@google.com>
2065
2066 dwarf-reader: templatize read_int_from_array_of_bytes
2067 * src/abg-dwarf-reader.cc (read_int_from_array_of_bytes):
2068 templatize return type to allow passing of signed integer references
2069
20702019-05-10 maennich@google.com <maennich@google.com>
2071
2072 dwarf-reader: Fix comments for try_reading_first_ksymtab_entry_using_{pre_,}v4_19_format
2073 * src/abg-dwarf-reader.cc: swap the comments of
2074 try_reading_first_ksymtab_entry_using_{pre_,}v4_19_format
2075
20762019-05-09 Dodji Seketeli <dodji@redhat.com>
2077
2078 Better handle several anonymous types of the same kind
2079 *unqualified* name of its scope. Unlike for qualified names, the
2080 scoped name won't have a "__anonymous_*__" string in its name if its
2081 directly containing scope is not anonymous; a qualified name might
2082 still have that string in its name because the decl has a parent scope
2083 (not necessarily its directly containing scope though) that is
2084 anonymous.
2085 The patch goes on to update the logic for comparison of decls that are
2086 anonymous. For a decl which direct scope is *NOT* anonymous, the
2087 scoped name is what's used in the comparison. Otherwise, only the
2088 name of the decl is used.
2089 The patch also updates how we detect changes in data members and
2090 member types, in the comparison engine. It now uses the names of the
2091 data members, rather than their qualified name. This is in the scope
2092 of the current class/union anyway. The improvement is that the fact
2093 that the class/union itself is anonymous (even if its anonymous name
2094 changes to another anonymous name) won't have any spurious impact on
2095 the detection of name change of the members.
2096 The patch considers the change of an anonymous decl name which
2097 anonymous name changes to another anonymous name as being harmless.
2098 The patch updates the logic of category propagation in the comparison
2099 engine. Although a public typedef to private underlying type needs to
2100 stay public and thus not propagate the PRIVATE_TYPE_CATEGORY from its
2101 child diff node to himself, it still needs to suppress the changes to
2102 the private underlying diff node that were suppressed (because of the
2103 private-ness), unless that typedef has local changes.
2104 * include/abg-ir.h (decl_base::get_scoped_name): Declare new
2105 member function.
2106 (scope_decl::get_num_anonymous_member_{classes, unions, enums}):
2107 Declare new virtual member functions.
2108 (class_decl::get_num_anonymous_member_{classes, unions, enums}):
2109 Adjust to make these virtual. It's not necessary but I feel
2110 redundancy is a kind of self-documentation here.
2111 * src/abg-comp-filter.cc (has_harmless_name_change): Consider
2112 anonymous name changes as harmless.
2113 * src/abg-comparison.cc
2114 (class_or_union_diff::ensure_lookup_tables_populated): Consider
2115 the names of the members rather than their qualified names.
2116 (suppression_categorization_visitor::visit_end): Suppress the
2117 changes to the private underlying diff node that were suppressed
2118 because of the private-ness, unless that typedef has local
2119 changes.
2120 * src/abg-dwarf-reader.cc (build_enum_type)
2121 (add_or_update_class_type, add_or_update_union_type): Handle
2122 anonymous types in namespaces as well, not just in class/unions.
2123 * src/abg-ir.cc (decl_base::priv::scoped_name_): Define new data
2124 member.
2125 (decl_base::get_scoped_name): Define new member function.
2126 (equals): For the decl_base overload, use scoped name in the
2127 comparison, unless the decl belongs to an anonymous type. For the
2128 class_or_union_diff, only consider scoped_name during comparison.
2129 Avoid name comparison between anonymous types.
2130 (scope_decl::get_num_anonymous_member_{classes, unions, enums}):
2131 Define new member functions.
2132 (types_have_similar_structure): Do not compare names between
2133 anonymous types.
2134 (qualified_name_setter::do_update): Update scoped names too.
2135 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
2136 * tests/data/test-annotate/libtest23.so.abi: Likewise.
2137 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
2138 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
2139 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
2140 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2141 * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt:
2142 Likewise.
2143 * tests/data/test-diff-dwarf/test46-rust-report-0.txt: Likewise.
2144 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
2145 Likewise.
2146 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
2147 Likewise.
2148 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
2149 Likewise.
2150 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
2151 Likewise.
2152 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
2153 Likewise.
2154 * tests/data/test-diff-filter/test33-report-0.txt: Likewise.
2155 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
2156 Likewise.
2157 * tests/data/test-diff-filter/test44-anonymous-data-member-report-0.txt:
2158 Likewise.
2159 * 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:
2160 Likewise.
2161 * tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt:
2162 Likewise.
2163 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt:
2164 Likewise.
2165 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt:
2166 Likewise.
2167 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
2168 Likewise.
2169 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
2170 Likewise.
2171 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
2172 Likewise.
2173 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2174 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
2175 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
2176 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
2177 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2178 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
2179 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
2180 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
2181 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2182 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2183 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
2184 Likewise.
2185 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2186
21872019-05-07 Dodji Seketeli <dodji@redhat.com>
2188
2189 Handle several member anonymous types of the same kind
2190 * include/abg-ir.h
2191 (class_or_union::get_num_anonymous_member_{classes, unions,
2192 enums}): Declare new member functions.
2193 * src/abg-dwarf-reader.cc (get_internal_anonynous_die_base_name)
2194 (build_internal_anonymous_die_name)
2195 (get_internal_anonymous_die_name, is_anonymous_type_die): Define
2196 new static functions.
2197 (die_qualified_type_name): Use the new
2198 get_internal_anonymous_die_name.
2199 (get_scope_for_die): Fix this to put anonymous types that were
2200 wrongly emitted into the scope of DW_TAG_subroutine_type or
2201 DW_TAG_array_type by buggy DWARF emitters into the enclosing
2202 namespace, rather than into the enclosing class/union.
2203 (build_enum_type): Take the scope of the enum to have a chance to
2204 properly name potential anonymous enums.
2205 (lookup_class_typedef_or_enum_type_from_corpus): Take an anonymous
2206 member type index for when the DIE we are lookup up represents an
2207 anonymous type. Support proper building of the internal anonymous
2208 name of the anonymous type we are lookup up.
2209 (add_or_update_class_type): Use the new
2210 get_internal_anonynous_die_base_name and
2211 build_internal_anonymous_die_name functions. Support making sure
2212 that the anonymous member type we are adding to the class wasn't
2213 already there, especially for cases where we are updating a class
2214 type.
2215 (add_or_update_union_type): Use the new
2216 get_internal_anonynous_die_base_name and
2217 build_internal_anonymous_die_name functions.
2218 (build_ir_node_from_die): Adjust the use of build_enum_type to
2219 pass it the scope of the enum type we are building.
2220 * src/abg-ir.cc (lookup_union_type): Add a new overload.
2221 (lookup_class_or_typedef_type): Use the new overload of
2222 lookup_union_type above to support looking up union types too.
2223 (class_or_union::get_num_anonymous_member_{classes, unions,
2224 enums}): Define new member functions.
2225 * src/abg-reporter-priv.cc (represent): Detect when anonymous
2226 types of anonymous data members have their internal names change,
2227 probably because anonymous member types were inserted in the scope.
2228 * tests/data/Makefile.am: Add the new test-anonymous-members-0.*
2229 test input files to the source distribution.
2230 * tests/data/test-annotate/test-anonymous-members-0.cc: New test
2231 input file.
2232 * tests/data/test-annotate/test-anonymous-members-0.o: Likewise.
2233 * tests/data/test-annotate/test-anonymous-members-0.o.abi: Likewise.
2234 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
2235 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
2236 Likewise.
2237 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2238 Likewise.
2239 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2240 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
2241 Likewise.
2242 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
2243 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
2244 Likewise.
2245 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
2246 Likewise.
2247 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2248 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2249 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2250 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2251 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
2252 Likewise.
2253 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2254 Likewise.
2255 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2256 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
2257 Likewise.
2258 * tests/test-annotate.cc (int_out_specs): Add the new test inputs
2259 to this test harness.
2260
22612019-04-24 Dodji Seketeli <dodji@redhat.com>
2262
2263 Use canonical types hash maps for type IDs in abixml writer
2264 * src/abg-writer.cc (write_context::{type_has_existing_id,
2265 get_id_for_type}): Save the canonical type of the type in the map,
2266 not the type itself.
2267 (write_context::{type_is_emitted}): Use the canonical type rather
2268 than the type itself.
2269 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2270
22712019-04-24 Dodji Seketeli <dodji@redhat.com>
2272
2273 Don't try to de-duplicate all anonymous struct DIEs
2274 * include/abg-fwd.h (is_typedef): Remove the overloads for
2275 type_base_sptr and decl_base_sptr. Replace those with an overload
2276 for type_or_decl_base_sptr.
2277 * src/abg-ir.cc (is_typedef): Do the same for the definitions.
2278 * src/abg-dwarf-reader.cc (add_or_update_class_type)
2279 (add_or_update_union_type): Do not de-duplicate anonymous
2280 struct/union DIEs.
2281 (build_typedef_type): Try to de-duplicate typedefs DIEs.
2282 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
2283 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2284 Likewise
2285 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2286 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Likewise.
2287 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2288 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2289 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2290 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2291 Likewise.
2292 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2293 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2294
22952019-04-24 Dodji Seketeli <dodji@redhat.com>
2296
2297 Canonicalize types non tied to any DWARF DIE
2298 * src/abg-dwarf-reader.cc
2299 (read_context::extra_types_to_canonicalize_): Add new data member.
2300 (read_context::{initialize, clear_types_to_canonicalize}): Adjust.
2301 (read_context::extra_types_to_canonicalize): Create new accessor.
2302 (read_context::schedule_type_for_late_canonicalization): Add new
2303 overload for type_base_sptr.
2304 (read_context::perform_late_type_canonicalizing): Perform the
2305 canonicalization of the types created by the DWARF analyzer, but
2306 that are not tied to any DIE.
2307 (maybe_strip_qualification): Take a read_context&. Schedule newly
2308 created types (during type edition) for late canonicalization.
2309 (build_ir_node_from_die): Adjust the call to
2310 maybe_strip_qualification to pass a read_context.
2311 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
2312 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
2313 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2314 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2315 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2316 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
2317 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2318 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2319 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
2320 Likewise.
2321
23222019-04-18 Mark Wielaard <mark@klomp.org>
2323
2324 Don't try to read a build_id as string in find_alt_debug_info_link.
2325 * src/abg-dwarf-reader.cc (find_alt_debug_info_link): Remove
2326 build_id argument. Don't try to read the buildid chars as a
2327 string.
2328 (find_alt_debug_info): Don't call find_alt_debug_info_link
2329 with a build_id string argument.
2330
23312019-04-18 Mark Wielaard <mark@klomp.org>
2332
2333 Fix an undefined behaviour in has_var_type_cv_qual_change
2334 * src/abg-comp-filter.cc: (has_var_type_cv_qual_change):
2335 Initialize the ch_kind variable before using it.
2336
23372019-04-18 Dodji Seketeli <dodji@redhat.com>
2338
2339 Add --enable-{asan,ubsan} configure options
2340 * configure.ac: Add configure options for -fsanitize=address and
2341 -fsanitize=undefined.
2342
23432019-04-18 Dodji Seketeli <dodji@redhat.com>
2344
2345 abg-tools-utils.cc: Plug a leak in find_file_under_dir
2346 * src/abg-tools-utils.cc (find_file_under_dir): Call fts_close
2347 before return.
2348
23492019-04-18 Matthias Maennich <maennich@google.com>
2350
2351 dwarf-reader: fix undefined behaviour in get_binary_load_address
2352 * src/abg-dwarf-reader.cc (get_binary_load_address): Move the
2353 ph_mem and program_header variables out of the inner for-loop.
2354
23552019-04-18 Dodji Seketeli <dodji@redhat.com>
2356
2357 Delay canonicalization for array and qualified types
2358 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Delay the
2359 canonicalization of array and qualified types, just like what we
2360 do for classes and function types already.
2361 (maybe_strip_qualification): Do not
2362 re-canonicalize array and qualified types here because it should
2363 not be necessary anymore.
2364
23652019-04-18 Dodji Seketeli <dodji@redhat.com>
2366
2367 Fix a memory leak in real_path
2368 * src/abg-tools-utils.cc (real_path): Fee the returned pointer of
2369 realpath.
2370
23712019-04-18 Dodji Seketeli <dodji@redhat.com>
2372
2373 Enable building with AddressSanitizer activated
2374 * configure.ac: If ABIGAIL_DEVEL_ASAN=on (in addition to
2375 ABIGAIL_DEVEL=on), then turn on AddressSanitizer in the build.
2376
23772019-04-17 Dodji Seketeli <dodji@redhat.com>
2378
2379 Bug 24431 - ELF reader fails to determine __ksymtab format
2380 * src/abg-dwarf-reader.cc
2381 (read_context::{try_reading_first_ksymtab_entry_using_pre_v4_19_format,
2382 try_reading_first_ksymtab_entry_using_v4_19_format}): Define new
2383 member functions.
2384 (read_context::maybe_adjust_sym_address_from_v4_19_ksymtab): Make
2385 member function this const.
2386 (read_context::get_ksymtab_format): Implement the new heuristic
2387 here, using try_reading_first_ksymtab_entry_using_pre_v4_19_format
2388 and try_reading_first_ksymtab_entry_using_v4_19_format, rather
2389 than assuming that if we have no relocations, then we are in the
2390 v4.19 format.
2391 (maybe_adjust_sym_address_from_v4_19_ksymtab): When on a 64 bits
2392 architecture, ensure the 32 bits address read from the v4.19
2393 format __ksymtab section is converted into a 64 bits address.
2394
23952019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2396
2397 Update .gitignore files to ignore typical dev side products
2398 * tests/.gitignore: exclude tests binaries and test results
2399 * tools/.gitignore: update to ignore produced binaries
2400
24012019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2402
2403 dwarf-reader: fix recursion in expr_result::operator&
2404 * src/abg-dwarf-reader.cc: fix expr_result::operator&
2405
24062019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2407
2408 distinct_diff: avoid expression with side effects within typeid
2409 * src/abg-comparison.cc: fix clang warning "potentially-evaluated-expression"
2410
24112019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2412
2413 ir: drop unused data members from {environment,qualified_name}_setter
2414 * src/abg-ir.cc: drop unused data members
2415
24162019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2417
2418 suppressions: drop unused parameter from type_is_suppressed
2419 * include/abg-suppression-priv.h: drop unused argument from type_is_suppressed
2420
24212019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2422
2423 viz-dot: remove unused members from dot
2424 * include/abg-viz-dot.h: remove unused data members from 'dot'
2425
24262019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2427
2428 add missing virtual destructors
2429 * include/abg-comparison.h: add virtual destructor for corpus_diff and diff_node_visitor
2430 * include/abg-corpus.h: add virtual destructor for corpus
2431 * include/abg-reporter.h: add virtual destructor for reporter_base
2432 * include/abg-traverse.h: add virtual destructor for traversable_base
2433
24342019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2435
2436 diff-utils: point: fix postfix decrement/increment operator
2437 * include/abg-diff-utils.h: fix postfix dec/inc operator
2438
24392019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2440
2441 abg-reader: clarify boolean use of assignment
2442 * src/abg-reader.cc: clarify boolean use of assignment
2443
24442019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2445
2446 abilint: fix return types bool -> int
2447 * tools/abilint.cc: return int in main rather than bool.
2448 * tests/print-diff-tree.cc: Likewise.
2449
24502019-04-15 Matthias Maennich via libabigail <libabigail@sourceware.org>
2451
2452 abg-fwd.h: fix mismatched tags for ir_node_visitor
2453 * include/abg-fwd.h: forward-declare ir_node_visitor as class
2454
24552019-04-16 Dodji Seketeli <dodji@redhat.com>
2456
2457 Bug 24431 - ELF reader can't interpret ksymtab with Kernel 4.19+
2458 * src/abg-dwarf-reader.cc (enum kernel_symbol_table_kind): Move this
2459 enum at the top.
2460 (enum ksymtab_format): Define new enum.
2461 (read_context::{ksymtab_format_, ksymtab_entry_size_,
2462 nb_ksymtab_entries_, nb_ksymtab_gpl_entries_}): Define new data
2463 members.
2464 (read_context::initiliaze): Initialize the new data members above.
2465 (read_context::{get_ksymtab_format, get_ksymtab_symbol_value_size,
2466 get_ksymtab_entry_size, get_nb_ksymtab_entries,
2467 get_nb_ksymtab_gpl_entries,
2468 maybe_adjust_sym_address_from_v4_19_ksymtab}): Define new member
2469 functions.
2470 (read_context::load_kernel_symbol_table): Support loading from
2471 both pre and post v4.19 linux kernels with their different ksymtab
2472 formats. Add more comments.
2473
24742019-04-10 Dodji Seketeli <dodji@redhat.com>
2475
2476 Bug 24430 - Fold away const for array types
2477 * include/abg-fwd.h (is_array_of_qualified_element): Declare 2
2478 overloads of this function.
2479 (re_canonicalize): Declare a new function.
2480 * include/abg-ir.h (class {decl_base, type_base}): Declare
2481 re_canonicalize as a friend of these classes.
2482 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Detect
2483 qualified array types and appropriately qualifies the array
2484 element type, instead of qualifying the array type itself.
2485 Re-canonicalize the resulting type if necessary.
2486 * src/abg-ir.cc (is_array_of_qualified_element): Define 2
2487 overloads of this function.
2488 (re_canonicalize): Define new function.
2489 * tests/data/Makefile.am: The two new test binary input files
2490 PR24430-fold-qualified-array-clang and
2491 PR24430-fold-qualified-array-gcc to source distribution, as well
2492 as the expected reference output.
2493 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
2494 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
2495 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2496 Likewise.
2497 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2498 * tests/data/test-diff-filter/PR24430-fold-qualified-array-clang:
2499 New binary test input coming from the bug report.
2500 * tests/data/test-diff-filter/PR24430-fold-qualified-array-gcc:
2501 Likewise.
2502 * tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt:
2503 Expected reference abi difference.
2504 * tests/data/test-diff-filter/test33-report-0.txt: Adjust.
2505 * tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt:
2506 Likewise.
2507 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2508 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2509 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
2510 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2511 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
2512 Likewise.
2513 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2514 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
2515 Likewise.
2516 * tests/test-diff-filter.cc: Add the new binary test input to this
2517 test harness.
2518
25192019-04-09 Dodji Seketeli <dodji@redhat.com>
2520
2521 Fix "Add test for the fix for PR24410"
2522 * tests/data/test-diff-pkg/PR24410-new/poppler-debuginfo-0.73.0-8.fc30.x86_64.rpm:
2523 Really add this.
2524 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-0.73.0-8.fc30.x86_64.rpm:
2525 Likewise.
2526 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-debuginfo-0.73.0-8.fc30.x86_64.rpm:
2527 Likewise.
2528 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-devel-0.73.0-8.fc30.x86_64.rpm:
2529 Likewise.
2530 * tests/data/test-diff-pkg/PR24410-old/poppler-debuginfo-0.73.0-4.fc30.x86_64.rpm:
2531 Likewise.
2532 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-0.73.0-4.fc30.x86_64.rpm:
2533 Likewise.
2534 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-debuginfo-0.73.0-4.fc30.x86_64.rpm:
2535 Likewise.
2536 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-devel-0.73.0-4.fc30.x86_64.rpm:
2537 Likewise.
2538 * tests/data/test-diff-pkg/PR24410-report-0.txt: Likewise.
2539
25402019-04-09 Dodji Seketeli <dodji@redhat.com>
2541
2542 Add test for the fix for PR24410
2543 * tests/data/test-diff-pkg/PR24410-new/poppler-debuginfo-0.73.0-8.fc30.x86_64.rpm:
2544 Add new test input.
2545 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-0.73.0-8.fc30.x86_64.rpm:
2546 Add new test input.
2547 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-debuginfo-0.73.0-8.fc30.x86_64.rpm:
2548 Add new test input.
2549 * tests/data/test-diff-pkg/PR24410-new/poppler-qt5-devel-0.73.0-8.fc30.x86_64.rpm:
2550 Add new test input.
2551 * tests/data/test-diff-pkg/PR24410-old/poppler-debuginfo-0.73.0-4.fc30.x86_64.rpm:
2552 Add new test input.
2553 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-0.73.0-4.fc30.x86_64.rpm:
2554 Add new test input.
2555 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-debuginfo-0.73.0-4.fc30.x86_64.rpm:
2556 Add new test input.
2557 * tests/data/test-diff-pkg/PR24410-old/poppler-qt5-devel-0.73.0-4.fc30.x86_64.rpm:
2558 Add new test input.
2559 * tests/data/test-diff-pkg/PR24410-report-0.txt: Add new test
2560 input.
2561 * tests/data/Makefile.am: Add the test input above to source
2562 distribution.
2563 * tests/test-diff-pkg.cc: Make this test harness use the new input
2564 rpms above.
2565
25662019-04-05 Dodji Seketeli <dodji@redhat.com>
2567
2568 Propagate private type diff category through refs/qualified type diffs
2569 * src/abg-comparison.cc
2570 (suppression_categorization_visitor::visit_end): Propagate
2571 suppressed and private type diff categories for reference and
2572 qualified types. For qualified types, make sure they don't have
2573 local changes. Even when there are no local changes, do not
2574 propagate private diff categories to typedefs.
2575 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
2576 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2577 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2578 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
2579 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
2580 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2581 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2582 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2583 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2584 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
2585 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2586
25872019-04-05 Dodji Seketeli <dodji@redhat.com>
2588
2589 Fix anonymous union constructed under the wrong context
2590 * src/abg-dwarf-reader.cc (add_or_update_class_type)
2591 (add_or_update_union_type): Only reuse anonymous class/union types
2592 which have the same scope as the current one.
2593
25942019-04-08 Dodji Seketeli <dodji@redhat.com>
2595
2596 Internal pretty repr of union cannot be flat representation
2597 * src/abg-ir.cc (union_decl::get_pretty_representation):
2598 Anonymous internal pretty representation of unin is its fully
2599 qualified name.
2600
26012019-04-08 Dodji Seketeli <dodji@redhat.com>
2602
2603 Misc comment fixes
2604 * src/abg-comp-filter.cc (has_harmless_name_change): Fix comment.
2605 * src/abg-ir.cc (var_decl::get_qualified_name): Likewise.
2606
26072019-03-29 Dodji Seketeli <dodji@redhat.com>
2608
2609 Bump version number to 1.7
2610 * configure.ac: Bump version number to 1.7
2611
26122019-03-28 Dodji Seketeli <dodji@redhat.com>
2613
2614 Update website mainpage for 1.6 release
2615 * doc/website/mainpage.txt: Update for 1.6 release.
2616
26172019-03-27 Dodji Seketeli <dodji@redhat.com>
2618
2619 Update ChangeLog
2620 * ChangeLog: Update automatically by using "make
2621 update-changelog".
2622
12019-03-27 Dodji Seketeli <dodji@redhat.com> 26232019-03-27 Dodji Seketeli <dodji@redhat.com>
2 2624
3 Update NEWS file for 1.6 2625 Update NEWS file for 1.6