From: dodji@redhat.com
To: libabigail@sourceware.org
Cc: dodji@redhat.com
Subject: [PATCH 01/17] ir: Fix a potential crash in canonicalize_types
Date: Tue, 16 Jul 2024 16:55:12 +0200 [thread overview]
Message-ID: <20240716145541.473065-2-dodji@redhat.com> (raw)
In-Reply-To: <20240716145541.473065-1-dodji@redhat.com>
From: Dodji Seketeli <dodji@redhat.com>
I noticed crashes in canonicalize_types when it deals with nullptr
types. Fixed thus.
* src/abg-ir-priv.h (canonicalize_types): Avoid crashing when
de-referencing an iterator to a nullptr type.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-ir-priv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h
index 78a05e72..a9002561 100644
--- a/src/abg-ir-priv.h
+++ b/src/abg-ir-priv.h
@@ -1620,7 +1620,7 @@ canonicalize_types(const input_iterator& begin,
// First, let's compute the canonical type of this type.
for (t = begin,i = 0; t != end; ++t, ++i)
{
- if (deref(t)->get_environment().priv_->do_log())
+ if (deref(t) && deref(t)->get_environment().priv_->do_log())
std::cerr << "#" << std::dec << i << " ";
canonicalize(deref(t));
--
2.43.5
next prev parent reply other threads:[~2024-07-16 14:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 14:55 [PATCH 00/17] Support self comparison of vmlinux & modules using BTF/CTF dodji
2024-07-16 14:55 ` dodji [this message]
2024-07-16 14:55 ` [PATCH 02/17] elf-based-reader: Clean up logic of elf_based_reader::read_and_add_corpus_to_group dodji
2024-07-16 14:55 ` [PATCH 03/17] tools-utils,btf-reader: Take modules into account for corpus group dodji
2024-07-16 14:55 ` [PATCH 04/17] corpus: Support adding translation units with empty path dodji
2024-07-16 14:55 ` [PATCH 05/17] ctf-reader: Do not set data member offsets for unions dodji
2024-07-16 14:55 ` [PATCH 06/17] ctf-reader: During re-initialization, only clear canonicalize-able types dodji
2024-07-16 14:55 ` [PATCH 07/17] ctf-reader: Fix analyzing single kernel binaries dodji
2024-07-16 14:55 ` [PATCH 08/17] reader: Fix corpus group reading dodji
2024-07-16 14:55 ` [PATCH 09/17] reader: Simplify type canonicalization invocation dodji
2024-07-16 14:55 ` [PATCH 10/17] reader: Simplify logic of get_or_read_and_add_translation_unit dodji
2024-07-16 14:55 ` [PATCH 11/17] reader: Fix building of void and void pointer types dodji
2024-07-16 14:55 ` [PATCH 12/17] reader: Fix building of variadic parameter type dodji
2024-07-16 14:55 ` [PATCH 13/17] ir: Don't strip typedefs from parms and return type when comparing fns dodji
2024-07-16 14:55 ` [PATCH 14/17] ir: Rename integral_type into real_type dodji
2024-07-16 14:55 ` [PATCH 15/17] ir,comparison,default-reporter: Consider sub-ranges in array diffs dodji
2024-07-16 14:55 ` [PATCH 16/17] abidw: Support the --abidiff option for Linux Kernel trees dodji
2024-07-16 14:55 ` [PATCH 17/17] configure: Support the optional 'big-tests' sub-directory dodji
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=20240716145541.473065-2-dodji@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).