Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Sep 2017 14:02:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 222146] java/openjdk8: Running a program of infinite recursion dumps core
Message-ID:  <bug-222146-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222146

            Bug ID: 222146
           Summary: java/openjdk8: Running a program of infinite recursion
                    dumps core
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: java@FreeBSD.org
          Reporter: pgj@FreeBSD.org
          Assignee: java@FreeBSD.org
             Flags: maintainer-feedback?(java@FreeBSD.org)

The Java Runtime Environment shipped with the recent version of the
`java/openjdk8` port crashes on an application that gets into an infinite
recursion at execution.

Consider an example of that, `Foo.java`:

~~~~
public class Foo {
    public static void main(String[] args) {
        main(args);
    }
}
~~~~

that does the following:

~~~~
$ freebsd-version
11.1-RELEASE-p1
$ java -version
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (build 1.8.0_144-b01)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
$ javac Foo.java
$ java Foo
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=3D0x000000080394da40, pid=3D13843, tid=3D0x000000000=
00187c1
#
# JRE version: OpenJDK Runtime Environment (8.0_144-b01) (build 1.8.0_144-b=
01)
# Java VM: OpenJDK 64-Bit Server VM (25.144-b01 mixed mode bsd-amd64 compre=
ssed
oops)
# Problematic frame:
# J 12 C1 Foo.main([Ljava/lang/String;)V (5 bytes) @ 0x000000080394da40
[0x000000080394da40+0x0]
#
# Core dump written. Default location: /tmp/java.core
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid13843.log
Compiled method (c1)     301   12       3       Foo::main (5 bytes)
 total in heap  [0x000000080394d8d0,0x000000080394dca0] =3D 976
 relocation     [0x000000080394d9f8,0x000000080394da38] =3D 64
 main code      [0x000000080394da40,0x000000080394db60] =3D 288
 stub code      [0x000000080394db60,0x000000080394dc08] =3D 168
 oops           [0x000000080394dc08,0x000000080394dc10] =3D 8
 metadata       [0x000000080394dc10,0x000000080394dc18] =3D 8
 scopes data    [0x000000080394dc18,0x000000080394dc48] =3D 48
 scopes pcs     [0x000000080394dc48,0x000000080394dc98] =3D 80
 dependencies   [0x000000080394dc98,0x000000080394dca0] =3D 8
Compiled method (c1)     302   12       3       Foo::main (5 bytes)
 total in heap  [0x000000080394d8d0,0x000000080394dca0] =3D 976
 relocation     [0x000000080394d9f8,0x000000080394da38] =3D 64
 main code      [0x000000080394da40,0x000000080394db60] =3D 288
 stub code      [0x000000080394db60,0x000000080394dc08] =3D 168
 oops           [0x000000080394dc08,0x000000080394dc10] =3D 8
 metadata       [0x000000080394dc10,0x000000080394dc18] =3D 8
 scopes data    [0x000000080394dc18,0x000000080394dc48] =3D 48
 scopes pcs     [0x000000080394dc48,0x000000080394dc98] =3D 80
 dependencies   [0x000000080394dc98,0x000000080394dca0] =3D 8
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Abort (core dumped)
~~~~

Note that a slightly earlier version would not crash but print the resulting
exception with an endless stack trace, something along this way:

~~~~
$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
$ java Foo
Exception in thread "main" java.lang.StackOverflowError
        at Foo.main(Foo.java:3)
        at Foo.main(Foo.java:3)
        at Foo.main(Foo.java:3)
[...]
~~~~

Although the program is bad, the VM should not crash still.  This is
reproducible on different machines, I guess it must be a regression.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222146-13>