1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/java
Dimitry Andric 3822416493 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13
During an exp-run for llvm 13 (see bug 258209), it turned out that
java/openjdk11 through openjdk13 fail to build with clang 13:

=== Output from failing command(s) repeated here ===
* For target jdk__packages_attribute.done:

These crashes are all caused by the markOop/markOopDesc classes, which
are used to keep track of objects, and which are 'marked' using the low
few bits. (See
https://github.com/openjdk/jdk13u/blob/master/src/hotspot/share/oops/markOop.hpp
).

After some laborious bisecting, I found out that these crashes start
occuring after the upstream commit https://github.com
/llvm/llvm-project/commit/16d03818412 (Return "[CGCall] Annotate this
argument with alignment").

What happens afterwards, is that clang considers the "this" pointer to
always be aligned to the alignment of the actual object, and then
masking or adding a few low bits is not working as expected.

The reason openjdk14 and higher work fine with clang 13, and don't crash
similarly, is that the OpenJDK people completely redid the
markOop/markOopDesc classes in
ae5615c614
("8229258: Rework markOop and markOopDesc into a simpler mark word value
carrier"). E.g, the markOopDesc class was renamed to markWord, and
*stores* a pointer-like value instead of *being* a pointer-like value.
This is a much safer way of handling things.

However, this upstream commit is *very* large, as are a few of its
follow-ups, which is probably the reason why it has not been backported
to JDKs <= 13. I tried manually backporting it, but got lost in many
nasty patch conflicts and problems.

As a workaround, build openjdk8 through 13 with clang12 from the
devel/llvm12 port, for the time being.

In addition, allow openjdk14 through 17 to be built with clang 13, by
adding -Wno-unused-but-set-parameter to the compilation flags.

PR:		258954
Approved by:	maintainer timeout (2 weeks)
MFH:		2021Q4
2021-10-16 14:22:03 +02:00
..
apache-bcel *: fix tab vs. space issues, and comments according to the guide. 2021-10-16 11:51:39 +02:00
apache-commons-beanutils Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
apache-commons-cli Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
apache-commons-codec One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
apache-commons-collections Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
apache-commons-dbcp java/apache-commons-dbcp: Update MASTER_SITES 2021-10-11 20:52:45 +02:00
apache-commons-discovery java/apache-commons-discovery: Update MASTER_SITES, deprecate and set expiration date to 2022-03-31 2021-10-14 10:30:54 +02:00
apache-commons-httpclient Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
apache-commons-lang java/apache-commons-lang: Add NO_ARCH 2021-07-01 04:44:27 +08:00
apache-commons-lang3 java/apache-commons-lang3: Upgrade to 3.12.0 2021-10-09 15:55:11 -07:00
apache-commons-logging Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
apache-commons-pool java/apache-commons-pool: update to 2.11.1 release. 2021-08-23 14:43:10 +02:00
apache-commons-primitives java/apache-commons-primitives: Update MASTER_SITES, deprecate and set expiration date to 2022-03-31 2021-10-10 10:51:52 +02:00
aparapi Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
avis all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
berkeley-db Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
bluej */*: Fix ENOTIME: return my ports to the pool 2021-05-22 10:13:01 +08:00
bootstrap-openjdk6 One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
bootstrap-openjdk8 java/openjdk8: Switch to server mode on aarch64 2021-09-01 18:23:08 +02:00
bootstrap-openjdk11 cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
bouncycastle Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
bouncycastle15 security/bouncycastle15: update to 1.69 2021-08-19 22:40:35 -05:00
cos Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
cryptix-jce One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
dbvis Deorbit RESTRICTED && NO_CDROM, part one. 2021-05-06 13:47:41 +02:00
eclipse java/eclipse: fix runtime on powerpc64 2021-08-08 22:46:59 +00:00
eclipse-cdt Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
eclipse-drjava Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
eclipse-ecj Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
eclipse-EPIC Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
eclipse-findbugs Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
eclipse-pydev *: fix tab vs. space issues, and comments according to the guide. 2021-10-16 11:51:39 +02:00
eclipse-shelled Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
hamcrest java/hamcrest: Add NO_ARCH 2021-07-01 04:44:27 +08:00
icedtea-web *: Rebuild lang/rust consumers after the 1.55.0 update 2021-09-19 11:03:23 +02:00
infobus Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
intellij Remove my useless "Created by" lines 2021-04-19 10:00:09 +02:00
intellij-fsnotifier Remove my useless "Created by" lines 2021-04-19 10:00:09 +02:00
intellij-pty4j Remove my useless "Created by" lines 2021-04-19 10:00:09 +02:00
intellij-rubymine java/intellij-rubymine: update to 2021.2.3 2021-10-15 23:33:05 +02:00
intellij-ultimate java/intellij-ultimate: update to 2021.2 release. 2021-08-23 12:41:52 +02:00
jad Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jai Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jakarta-oro Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jasmin all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
jattach One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
java3d graphics/mesa-libs: Bump reverse deps for libglvnd 2021-06-22 11:53:08 -07:00
java-cup all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
java-getopt Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
java-subversion Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
java-zoneinfo java/java-zoneinfo: Update to 2021b 2021-10-13 23:14:28 -07:00
javahelp Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
javamail Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
javavmwrapper all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
jaxen Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jcalendar Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jcckit Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jcommon Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jd-gui Remove my useless "Created by" lines 2021-04-19 10:00:09 +02:00
jdk8-doc Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jdk11-doc Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jdk12-doc Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jdom Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jflex all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
jfreechart Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jgraph Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jgraphx One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
jikes Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jlex all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
jlint Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jmf Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jode Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jrosetta Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jta Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
jtiger Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
jump Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
junit java/junit: Add NO_ARCH 2021-07-01 04:44:27 +08:00
jxgrabkey all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
lightweight-java-profiler Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
linux-oracle-jdk18 java/linux-oracle-jdk18: Update to 8u291 2021-05-08 13:45:20 -07:00
linux-oracle-jre18 Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
linux-oracle-serverjre10 Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
mmake Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
mx4j Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
netbeans java/netbeans: Add CPE information 2021-10-08 11:21:27 +00:00
netcomponents Deorbit RESTRICTED && NO_CDROM, part two. 2021-05-06 13:47:48 +02:00
netrexx Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
netty java/netty: Fix CPE information because current one is deprecated 2021-09-14 10:55:19 +00:00
openjdk7 *: fix tab vs. space issues, and comments according to the guide. 2021-10-16 11:51:39 +02:00
openjdk7-jre One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
openjdk8 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk8-jre One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
openjdk11 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk11-jre One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
openjdk12 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk13 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk14 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk15 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk16 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjdk17 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13 2021-10-16 14:22:03 +02:00
openjfx14 graphics/mesa-libs: Bump reverse deps for libglvnd 2021-06-22 11:53:08 -07:00
phpeclipse Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
proguard all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
sablevm One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
sablevm-classpath Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
servingxml Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
sigar java/sigar: the port had been updated and improved (+) 2021-07-16 19:44:37 +00:00
springframework Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
springframework31 Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
sqlitejdbc Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
trove4j java/trove4j: Drop maintainership 2021-05-19 20:56:14 +01:00
veditor Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
visualvm One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
wildfly10 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
wildfly11 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
wildfly12 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
wildfly13 java/wildfly13: fix plist (@sample) 2021-05-12 14:55:38 +03:00
wildfly14 One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
wildfly15 One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
wildfly16 One more small cleanup, forgotten yesterday. 2021-04-07 10:09:01 +02:00
wildfly17 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
wildfly18 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
wildfly90 all: Remove all other $FreeBSD keywords. 2021-04-06 16:31:13 +02:00
Makefile java/openjdk17: Add a port of OpenJDK 17 2021-09-25 11:28:38 -07:00