public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] dwarf-reader: Fix DWARF string comparison optimization
Date: Mon, 20 Jun 2022 18:09:51 +0200	[thread overview]
Message-ID: <87k09bgvu8.fsf@redhat.com> (raw)

[-- 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

                 reply	other threads:[~2022-06-20 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k09bgvu8.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).