* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
@ 2021-09-09 9:44 ` gprocida at google dot com
2021-09-09 12:30 ` gprocida at google dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gprocida at google dot com @ 2021-09-09 9:44 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #1 from gprocida at google dot com ---
Stack trace from attaching GDB:
#0 __memcmp_avx2_movbe () at
../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:66
#1 0x00005637c946e4a5 in std::__1::char_traits<char>::compare
(__s1=0x5637ccb99550 "bionic/libc/upstream-freebsd/lib/libc/gen/glob.c",
__s2=0x5637ccb99550 "bionic/libc/upstream-freebsd/lib/libc/gen/glob.c",
__n=48) at external/libcxx/include/__string:250
#2 std::__1::operator==<std::__1::allocator<char> > (__lhs=..., __rhs=...) at
external/libcxx/include/string:3866
#3 0x00005637c9570157 in
abigail::xml_writer::referenced_type_should_be_emitted (t=0x5637ccbb24b0,
ctxt=..., tu=..., tu_is_last=false)
at external/libabigail/src/abg-writer.cc:2267
#4 abigail::xml_writer::write_translation_unit (ctxt=..., tu=...,
indent=<optimized out>, is_last=false)
at external/libabigail/src/abg-writer.cc:2457
#5 0x00005637c9573700 in abigail::xml_writer::write_corpus (ctxt=...,
corpus=..., indent=0, member_of_group=<optimized out>)
at external/libabigail/src/abg-writer.cc:4508
#6 0x00005637c937bc7a in load_corpus_and_write_abixml (argv=0x7ffc078e0298,
env=..., context=..., opts=...)
at external/libabigail/tools/abidw.cc:654
#7 0x00005637c937a491 in main (argc=<optimized out>, argv=0x7ffc078e0298) at
external/libabigail/tools/abidw.cc:893
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
2021-09-09 9:44 ` [Bug default/28320] " gprocida at google dot com
@ 2021-09-09 12:30 ` gprocida at google dot com
2021-09-13 10:23 ` dodji at redhat dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gprocida at google dot com @ 2021-09-09 12:30 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #2 from gprocida at google dot com ---
Bisected to "Bug 27995 - Self comparison error from abixml file".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
2021-09-09 9:44 ` [Bug default/28320] " gprocida at google dot com
2021-09-09 12:30 ` gprocida at google dot com
@ 2021-09-13 10:23 ` dodji at redhat dot com
2021-09-13 15:12 ` dodji at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dodji at redhat dot com @ 2021-09-13 10:23 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #3 from dodji at redhat dot com ---
Hello,
I couldn't reproduce this issue on the branch you mentioned, while compiling
libabigail with gcc.
However, I tried punching in the dark a little bit.
Could you please try this patch and see if it as an impact at all?
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 9f48dc92..46b6d456 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -2356,7 +2356,8 @@ write_translation_unit(write_context& ctxt,
// considered "opaque".
if (class_decl_sptr class_type = is_class_type(t))
if (class_type->get_is_declaration_only()
- && !ctxt.type_is_emitted(class_type))
+ && !ctxt.type_is_emitted(class_type)
+ && !ctxt.decl_only_type_is_emitted(class_type))
write_type(class_type, ctxt,
indent + c.get_xml_element_indent());
continue;
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
` (2 preceding siblings ...)
2021-09-13 10:23 ` dodji at redhat dot com
@ 2021-09-13 15:12 ` dodji at redhat dot com
2021-09-13 20:09 ` gprocida at google dot com
2021-09-14 16:54 ` gprocida at google dot com
5 siblings, 0 replies; 7+ messages in thread
From: dodji at redhat dot com @ 2021-09-13 15:12 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #4 from dodji at redhat dot com ---
Hmmh, actually, this one might be the one to try, rather:
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 9f48dc92..2062c326 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -2356,7 +2356,8 @@ write_translation_unit(write_context& ctxt,
// considered "opaque".
if (class_decl_sptr class_type = is_class_type(t))
if (class_type->get_is_declaration_only()
- && !ctxt.type_is_emitted(class_type))
+ && !ctxt.type_is_emitted(class_type)
+ && !ctxt.decl_only_type_is_emitted(class_type))
write_type(class_type, ctxt,
indent + c.get_xml_element_indent());
continue;
@@ -2420,7 +2421,8 @@ write_translation_unit(write_context& ctxt,
// We handle types which have declarations *and* function
// types here.
type_base_sptr t(*i, noop_deleter());
- if (!ctxt.type_is_emitted(t))
+ if (!ctxt.type_is_emitted(t)
+ && !ctxt.decl_only_type_is_emitted(t))
{
if (decl_base* d = get_type_declaration(*i))
{
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
` (3 preceding siblings ...)
2021-09-13 15:12 ` dodji at redhat dot com
@ 2021-09-13 20:09 ` gprocida at google dot com
2021-09-14 16:54 ` gprocida at google dot com
5 siblings, 0 replies; 7+ messages in thread
From: gprocida at google dot com @ 2021-09-13 20:09 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #5 from gprocida at google dot com ---
FTR, the patches in comments #3 and #4 did not help.
I have been able to reproduce *a* problem if not *the* problem using a vanilla
GCC build. See https://sourceware.org/pipermail/libabigail/2021q3/003667.html.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug default/28320] abidw - (non-deterministic) infinite loop in XML writer
2021-09-09 9:30 [Bug default/28320] New: abidw - (non-deterministic) infinite loop in XML writer gprocida at google dot com
` (4 preceding siblings ...)
2021-09-13 20:09 ` gprocida at google dot com
@ 2021-09-14 16:54 ` gprocida at google dot com
5 siblings, 0 replies; 7+ messages in thread
From: gprocida at google dot com @ 2021-09-14 16:54 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #6 from gprocida at google dot com ---
I've debugged the issue I see with the test suite (with the debugging patches I
posted active).
The triggering command is:
build/tools/abipkgdiff --verbose --self-check --d1
tests/data/test-diff-pkg/nmap-debuginfo-7.70-5.el8_testjcc.x86_64.rpm --d2
tests/data/test-diff-pkg/nmap-debuginfo-7.70-5.el8_testjcc.x86_64.rpm
tests/data/test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64.rpm
tests/data/test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64.rpm
It triggers on "struct lua_State". The type already in the map (already
emitted) is declaration only with no named_definition_of_declaration while the
other is a canonical type (get_naked_canonical_type gives the same pointer).
Tracing through what the deep_ptr_eq_functor does:
The first type is a class_decl, as is the second, and end we up in
equals(class_decl, class_decl). One of them is declaration only, so this
function delegates to equals(class_or_union, class_or_union). One of the types
is declaration only, neither are anonymous and ODR is relevant, so equality
checks the scoped names.
The scoped names are identical and equality evaluates to true.
On the other hand, the hash values are completely different.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread