From 1d6bc937a341370742a6fb2f2ed4f33962223dba Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 1 Oct 2024 12:37:43 +0200 Subject: [PATCH] writer: Do not crash on ABI corpora that have no associated path When write_context::record_corpus_as_emitted is invoked on an ABI corpus that has no associated path, it crashes as that violates an assert. This patch loosens the assert, allowing ABI corpora with no associated paths to be handled. * src/abg-writer.cc (write_context::record_corpus_as_emitted): Allow corpus without path. Signed-off-by: Dodji Seketeli --- src/abg-writer.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/abg-writer.cc b/src/abg-writer.cc index edd85326..b0bd095e 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -807,9 +807,8 @@ public: return; const string& path = corp->get_path(); - ABG_ASSERT(!path.empty()); - - m_emitted_corpora_set.insert(path); + if (!path.empty()) + m_emitted_corpora_set.insert(path); } /// Get the set of types that have been emitted. -- 2.43.5