This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/70839] New: [6/7 regression] Every libjava execution test FAILs: Incorrect library ABI version detected


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

            Bug ID: 70839
           Summary: [6/7 regression] Every libjava execution test FAILs:
                    Incorrect library ABI version detected
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: java
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---

Created attachment 38355
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38355&action=edit
proposed patch

Since the 6.1.0 release, every single libjava execution test FAILs everywhere
(seen on Solaris/x86, Linux/x86_64, and Darwin/x86):

libgcj failure: gcj linkage error.
Incorrect library ABI version detected.  Aborting.

The message is from libjava/java/lang/natClassLoader.cc (_Jv_CheckABIVersion)
which (on i386-pc-solaris2.12) is called like this:

#0  _Jv_CheckABIVersion (value=1074342824)
    at /vol/src/gnu/gcc/gcc-6.1.0/libjava/java/lang/natClassLoader.cc:271
#1  0xffff80ffbde0b47d in _Jv_RegisterClasses (
    classes=0xffff80ffbeced688 <_Jv_JCR_SECTION_data>)
    at /vol/src/gnu/gcc/gcc-6.1.0/libjava/java/lang/natClassLoader.cc:293
#2  0xffff80ffbddc553a in frame_dummy ()
   from
/var/gcc/gcc-6.1.0/12-gcc-gas/i386-pc-solaris2.12/amd64/libjava/.libs/libgcj.so.17
#3  0xffff80ffbf630288 in call_array () from /lib/amd64/ld.so.1
#4  0xffff80ffbf630414 in call_init () from /lib/amd64/ld.so.1
#5  0xffff80ffbf62f3b0 in setup () from /lib/amd64/ld.so.1
#6  0xffff80ffbf6425f7 in _setup () from /lib/amd64/ld.so.1
#7  0xffff80ffbf62131e in _rt_boot () from /lib/amd64/ld.so.1

The version == GCJ_CXX_ABI_VERSION test fails: the latter is (from
libjava/include/jvm.h)

#define GCJ_CXX_ABI_VERSION (__GNUC__ * 100000)

Before the release, version was 600000, since then it's 601000.

In libjava/java/lang/natClassLoader.c (_Jv_RegisterClasses) we have

     _Jv_CheckABIVersion ((unsigned long) klass->next_or_version);

where klass->next_or_version is set in gcc/java/class.c (make_class_data):

  PUSH_FIELD_VALUE (v2, "next_or_version", gcj_abi_version);

Ultimately, gcc/java/decl.c (parse_version) sets gcj_abi_version from
version_string and still extracts the minor version, while this libjava
change

2016-01-03  Matthias Klose  <doko@ubuntu.com>

        * libtool-version: Bump soversion.
        * include/jvm.h (GCJ_CXX_ABI_VERSION): Don't encode __GNUC_MINOR__.

doesn't expect the minor version any longer.

The attached patch gets rid of the minor version in jc1, too and seems to fix
the errors (x86_64-apple-darwin15.5.0 libjava make check still running).

  Rainer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]