public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/108056] New: backward compatibility issue between 11 and 12
@ 2022-12-11  6:37 gilles.gouaillardet at gmail dot com
  2022-12-11  7:05 ` [Bug libfortran/108056] " kargl at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: gilles.gouaillardet at gmail dot com @ 2022-12-11  6:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108056

            Bug ID: 108056
           Summary: backward compatibility issue between 11 and 12
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gilles.gouaillardet at gmail dot com
  Target Milestone: ---

Created attachment 54062
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54062&action=edit
a simple reproducer

The attached program crashes when compiled on ubuntu 22.04 (jammy) based on
debian bookworm with gfortran-11:

$ gfortran bug.f90 
$ ./a.out 
Internal Error: Invalid type in descriptor

Error termination. Backtrace:
#0  0x7f04aefe9ad0 in ???
#1  0x7f04aefea649 in ???
#2  0x7f04aefeae38 in ???
#3  0x7f04af22c8a4 in ???
#4  0x56490815c24e in ???
#5  0x56490815c1f3 in ???
#6  0x56490815c316 in ???
#7  0x56490815c352 in ???
#8  0x7f04aedc7d8f in __libc_start_call_main
        at ../sysdeps/nptl/libc_start_call_main.h:58
#9  0x7f04aedc7e3f in __libc_start_main_impl
        at ../csu/libc-start.c:392
#10  0x56490815c0c4 in ???
#11  0xffffffffffffffff in ???


After some investigations, I found gfortran-11 uses libgfortran built for
gfortran-12. I guess the fine folks at debian chose to do so since the version
library for libgfortran in 5.0.0 (from gfortran-8 up to gfortran-12, I did not
test gfortran-13) and they assume or expect ABI and semantic compatibility.

The issue can be reproduced by compiling the attached reproducer with
gfortran-11, and running it after tweaking LD_LIBRARY_PATH so it uses
libgfortran from gfortran-12.


I think there are basically two ways to see this issue:
 - it should work, this is a bug in libfrotran-12
 - libgfortran does not ensure such backward compatibility, and because of the
semantic change, the library version should be/have been bumped ( e.g. 5.1.0 or
6.0.0) from gfortran-12.

Once it is decided on how to move forward, I will be more than happy to report
this to the debian folks.

For the records, this issue came to my attention at
https://stackoverflow.com/questions/74738981/the-use-mpi-f08-statement-causes-fortran-mpi-programs-to-crash-on-ubuntu-22-04/74742760#74742760

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-12-21  7:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11  6:37 [Bug libfortran/108056] New: backward compatibility issue between 11 and 12 gilles.gouaillardet at gmail dot com
2022-12-11  7:05 ` [Bug libfortran/108056] " kargl at gcc dot gnu.org
2022-12-11  7:44 ` gilles.gouaillardet at gmail dot com
2022-12-11  7:51 ` gilles.gouaillardet at gmail dot com
2022-12-11  8:44 ` rimvydas.jas at gmail dot com
2022-12-11 13:19 ` [Bug libfortran/108056] [12/13 Regression] " rguenth at gcc dot gnu.org
2022-12-11 18:34 ` kargl at gcc dot gnu.org
2022-12-11 22:15 ` sandra at gcc dot gnu.org
2022-12-11 22:24 ` jakub at gcc dot gnu.org
2022-12-12  8:40 ` jakub at gcc dot gnu.org
2022-12-12  9:07 ` rguenther at suse dot de
2022-12-12  9:10 ` gilles.gouaillardet at gmail dot com
2022-12-12 12:09 ` burnus at gcc dot gnu.org
2022-12-12 12:34 ` rguenther at suse dot de
2022-12-15 11:27 ` cvs-commit at gcc dot gnu.org
2022-12-16  2:47 ` haochen.jiang at intel dot com
2022-12-16  7:48 ` burnus at gcc dot gnu.org
2022-12-16  7:57 ` cvs-commit at gcc dot gnu.org
2022-12-20 17:22 ` jakub at gcc dot gnu.org
2022-12-21  7:13 ` [Bug libfortran/108056] [12 " rguenth at gcc dot gnu.org
2022-12-21  7:23 ` cvs-commit at gcc dot gnu.org
2022-12-21  7:34 ` rguenth at gcc dot gnu.org

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).