I was originally investigating "harmless union" changes when I managed to crash abidiff when adding member functions to unions. SEGV #1 $ head ?.cc ==> 1.cc <== union S { void bar() const { } int needed; }; void fun(S s) { s.bar(); } ==> 2.cc <== union S { void bar() const { } }; void fun(S s) { s.bar(); } $ for x in ?.cc; do g++ -Wall -Wextra -g -c $x; done $ abidiff ?.o Functions changes summary: 0 Removed, 2 Changed, 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 2 functions with some indirect sub-type change: [C] 'method void S::bar() const' at 2.cc:2:1 has some indirect sub-type changes: Segmentation fault SEGV #2 $ head ?.cc ==> 1.cc <== union S { void bar() const { } int needed; }; void fun(S s) { s.bar(); } ==> 2.cc <== struct S { void bar() const { } }; void fun(S s) { s.bar(); } $ for x in ?.cc; do g++ -Wall -Wextra -g -c $x; done $ abidiff ?.o Functions changes summary: 0 Removed, 2 Changed, 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 2 functions with some indirect sub-type change: [C] 'method void S::bar() const' at 2.cc:2:1 has some indirect sub-type changes: Segmentation fault
A fix for this has been applied to master at https://sourceware.org/git/?p=libabigail.git;a=commit;h=2f8e1db0e7a163eda943001703d9fa0ecfad2806. It should be available in libabigail 2.0. Thanks for filling this problem report.