Bug 26780 - Wrong array subrange bound serialization with Fortran programs
Summary: Wrong array subrange bound serialization with Fortran programs
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
: 26942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-23 22:30 UTC by Ben Woodard
Modified: 2020-11-27 16:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2020-10-23 22:30:39 UTC
This is with the current trunk version of libabigail
$ rpm -qf $lib
hdf5-1.10.6-2.fc33.x86_64
$ lib=/lib64/libhdf5hl_fortran.so.100.0.5
$ /home/ben/Scratch/Work/test/libabigail-x86_64/bin/abidw $lib > foo; /home/ben/Scratch/Work/test/libabigail-x86_64/bin/abidiff $lib foo 
Functions changes summary: 0 Removed, 23 Changed (14 filtered out), 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

23 functions with some indirect sub-type change:

  [C] 'function void h5lt::h5ltmake_dataset_double_kind_16_rank_0(integer(kind=8), integer(kind=4), integer(kind=8)[], real(kind=16), integer(kind=4), const integer(kind=8))' at H5LTff_gen.F90:2990:1 has some indirect sub-type changes:
abidiff: ../../../libabigail/src/abg-default-reporter.cc:535: virtual void abigail::comparison::default_reporter::report(const abigail::comparison::fn_parm_diff&, std::ostream&, const string&) const: Assertion `__abg_cond__' failed.
Aborted (core dumped)


$ gdb --silent --args /home/ben/Scratch/Work/test/libabigail-x86_64/bin/abidiff $lib foo 
Reading symbols from /home/ben/Scratch/Work/test/libabigail-x86_64/bin/abidiff...
(gdb) r
Starting program: /home/ben/Scratch/Work/test/libabigail-x86_64/bin/abidiff /lib64/libhdf5hl_fortran.so.100.0.5 foo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Download failed: Connection refused.  Continuing without debug info for /lib64/libxml2.so.2.
Download failed: Connection refused.  Continuing without debug info for /lib64/libelf.so.1.
Download failed: Connection refused.  Continuing without debug info for /lib64/libdw.so.1.
Functions changes summary: 0 Removed, 23 Changed (14 filtered out), 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

23 functions with some indirect sub-type change:

  [C] 'function void h5lt::h5ltmake_dataset_double_kind_16_rank_0(integer(kind=8), integer(kind=4), integer(kind=8)[], real(kind=16), integer(kind=4), const integer(kind=8))' at H5LTff_gen.F90:2990:1 has some indirect sub-type changes:
abidiff: ../../../libabigail/src/abg-default-reporter.cc:535: virtual void abigail::comparison::default_reporter::report(const abigail::comparison::fn_parm_diff&, std::ostream&, const string&) const: Assertion `__abg_cond__' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
49	  return ret;
(gdb) bt
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff75098a4 in __GI_abort () at abort.c:79
#2  0x00007ffff7509789 in __assert_fail_base (fmt=0x7ffff7676e68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff7f3bfa4 "__abg_cond__", 
    file=0x7ffff7f44e60 "../../../libabigail/src/abg-default-reporter.cc", line=535, function=<optimized out>) at assert.c:92
#3  0x00007ffff7518fc6 in __GI___assert_fail (assertion=0x7ffff7f3bfa4 "__abg_cond__", file=0x7ffff7f44e60 "../../../libabigail/src/abg-default-reporter.cc", 
    line=535, 
    function=0x7ffff7f45198 "virtual void abigail::comparison::default_reporter::report(const abigail::comparison::fn_parm_diff&, std::ostream&, const string&) const")
    at assert.c:101
#4  0x00007ffff7e60449 in abigail::comparison::default_reporter::report (this=<optimized out>, d=..., out=..., indent="    ") at /usr/include/c++/10/ext/atomicity.h:97
#5  0x00007ffff7dedabf in abigail::comparison::fn_parm_diff::report (this=0x56e6b0, out=..., indent="    ") at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#6  0x00007ffff7e605a9 in abigail::comparison::default_reporter::report (this=0x44f220, d=..., out=..., indent="    ")
    at ../../../libabigail/src/abg-default-reporter.cc:663
#7  0x00007ffff7dedb42 in abigail::comparison::function_type_diff::report (this=0x56e080, out=..., indent="    ") at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#8  0x00007ffff7e5d3a3 in abigail::comparison::default_reporter::report (this=<optimized out>, d=..., out=..., indent="    ")
    at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#9  0x00007ffff7dedbc2 in abigail::comparison::function_decl_diff::report (this=this@entry=0x56ecd0, out=..., indent="    ")
    at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#10 0x00007ffff7e6519e in abigail::comparison::default_reporter::report (this=<optimized out>, d=..., out=..., indent="")
    at /usr/include/c++/10/bits/basic_string.h:901
#11 0x00007ffff7deddb2 in abigail::comparison::corpus_diff::report (this=this@entry=0x6f9480, out=..., indent="") at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#12 0x0000000000406881 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/10/ext/new_allocator.h:79

This error appears to be unique among all the libs that I have checked so far.
Comment 1 Ben Woodard 2020-11-25 00:24:12 UTC
*** Bug 26942 has been marked as a duplicate of this bug. ***
Comment 2 Ben Woodard 2020-11-25 00:26:42 UTC
This seems to have something to do with fortran. It happens with both libgfortran and libhdf5ll_fortran
Comment 3 Ben Woodard 2020-11-25 00:27:40 UTC
This continues to manifest with commit 2c0dd017 from dodji/PR26769
Comment 4 Dodji Seketeli 2020-11-27 16:57:43 UTC
This should be fixed by commit https://sourceware.org/git/?p=libabigail.git;a=commit;h=b553802af8c0a7afd4a2edb8df3eda6ae80549cc in the master branch.

The fix should be available in the coming 1.8 version of libabigail.

Thanks for reporting this problem!