Bug 255900 - java/openjdk11 java/openjdk11-jre: Fix possible segfaults with clang 12
Summary: java/openjdk11 java/openjdk11-jre: Fix possible segfaults with clang 12
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks: 255570
  Show dependency treegraph
 
Reported: 2021-05-15 13:36 UTC by Dimitry Andric
Modified: 2021-05-29 14:14 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
Fix java/openjdk11 (and openjdk11-jre) builds with clang 12 (998 bytes, patch)
2021-05-15 13:36 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2021-05-15 13:36:36 UTC
Created attachment 224966 [details]
Fix java/openjdk11 (and openjdk11-jre) builds with clang 12

During an exp-run for llvm 12 (see bug 255570), it turned out that java/openjdk11 and java/openjdk11-jre do not build with clang 12.0.0 [1]:

Creating interim jimage
Compiling 2 files for BUILD_DEMO_Notepad
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00000008024be650, pid=58260, tid=148291
#
# JRE version: OpenJDK Runtime Environment (11.0.10+9) (build 11.0.10+9-1)
# Java VM: OpenJDK 64-Bit Server VM (11.0.10+9-1, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# V  [libjvm.so+0x6be650]  Arena::destruct_contents()+0x80

This is due to a missing backport of this commit [3]:

commit c484d8904285652246c3af212a4211b9a8955149
Author: Thomas Stuefe <stuefe@openjdk.org>
Date:   Tue Mar 16 05:49:01 2021 +0000

    8263557: Possible NULL dereference in Arena::destruct_contents()

    Reviewed-by: kbarrett, coleenp

I have attached a patch that adds this commit as an additional patch.

[1] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_16h02m24s/logs/openjdk11-11.0.10+9.1_1.log
[2] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_16h02m24s/logs/openjdk11-jre-11.0.10+9.1_1.log
[3] https://github.com/openjdk/jdk/commit/c484d8904285652246c3af212a4211b9a8955149
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2021-05-23 19:02:05 UTC
Could we please expedite this patch? As it is required to unblock quite a few dependencies for the exp-run in bug 255570.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-29 14:09:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a47b2844217978a9b577182214c795dbfe471451

commit a47b2844217978a9b577182214c795dbfe471451
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-05-15 14:45:26 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-05-29 14:08:18 +0000

    java/openjdk11(-jre): fix build with clang 12

    During an exp-run for llvm 12 (see bug 255570), it turned out that
    java/openjdk11 and java/openjdk11-jre do not build with clang 12.0.0:

    Creating interim jimage
    Compiling 2 files for BUILD_DEMO_Notepad

    This is due to a missing backport of an upstream commit:

    commit c484d8904285652246c3af212a4211b9a8955149
    Author: Thomas Stuefe <stuefe@openjdk.org>
    Date:   Tue Mar 16 05:49:01 2021 +0000

        8263557: Possible NULL dereference in Arena::destruct_contents()

        Reviewed-by: kbarrett, coleenp

    Approved by:    maintainer timeout (2 weeks)
    PR:             255900
    MFH:            2021Q2

 .../openjdk11/files/patch-commit-c484d890428 (new) | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)