public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied] dwarf-reader: Fix DWARF string comparison optimization
@ 2022-06-20 16:09 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2022-06-20 16:09 UTC (permalink / raw)
  To: libabigail

[-- Attachment #1: Type: text/plain, Size: 2163 bytes --]

Hello,

This fix has been triggered by a fix posted by Thomas Schwinge in the
thread that started at https://sourceware.org/pipermail/libabigail/2022q1/004139.html.

Thomas rightfully notes that compare_dies_string_attribute_value is
wrong.  In some cases, it wrongly considers only the first character
of the two strings to compare.

This patch fixes that and updates the regression tests accordingly.
The fix suppresses several spurious changes (in runtestdifffilter)
that were there and I never got the bottom of them.  Now they are
gone.

	* src/abg-dwarf-reader.cc (slowly_compare_strings)
	(die_char_str_attribute): Define new static functions.
	(compare_dies_string_attribute_value): Use the new
	slowly_compare_strings here.
	* tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
	* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
	* tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 src/abg-dwarf-reader.cc                       |    63 +-
 .../data/test-annotate/test15-pr18892.so.abi  |  8880 +++++----
 .../data/test-annotate/test17-pr19027.so.abi  |   708 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  2379 ++-
 .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi |   776 +-
 .../test-read-dwarf/test-libandroid.so.abi    |   385 +-
 .../test-read-dwarf/test15-pr18892.so.abi     |  8306 ++++----
 .../test-read-dwarf/test17-pr19027.so.abi     |   657 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  2162 +--
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 15735 ++++++++--------
 10 files changed, 20022 insertions(+), 20029 deletions(-)

The gzipped patch is attached below.


[-- Attachment #2: gzipped patch file --]
[-- Type: application/gzip, Size: 480274 bytes --]

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]


-- 
		Dodji

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-20 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 16:09 [PATCH, applied] dwarf-reader: Fix DWARF string comparison optimization Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).