diff options
author | André Draszik <andre.draszik@jci.com> | 2018-08-14 13:50:58 +0100 |
---|---|---|
committer | Richard Leitner <richard.leitner@skidata.com> | 2018-08-14 16:41:47 +0200 |
commit | e89564dc67cf0136d998a73813c74d9e174f30af (patch) | |
tree | b6b8b90360be488da280b06833c604858fea8c6a /recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch | |
parent | cd17a0f9389594d931d859472c18d166d4996df1 (diff) | |
download | meta-java-e89564dc67cf0136d998a73813c74d9e174f30af.tar.gz |
openjdk-8: gcc-8 fix #4: undefined behaviour (hotspot)
Using gcc-8, Hotspot is being miscompiled, resulting in non-
working binaries.
The reason is undefined behaviour, which gcc-8 even warns about
and errors out. We have so far have taped over those warnings,
but it turns out that we simply cannot do that.
Add patches to address undefined behaviour causing miscompilation
of hotsport.
This also means we can remove the -Wno-error=return-type C compiler
flag again which was recently added in error in
commit 52fb41cec7d5 ("openjdk-8: fix build for gcc8.x") only hiding
the compiler warnings/errors that were flagging the incorrect code
in the first place.
With these patches applied, the openjdk-8 ARM port works again:
| RESULTS:
| RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.04s)
| RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (0.68s)
| RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.14s)
| RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: FAILED (5.13s)
| RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (4.48s)
| RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (4.44s)
| RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (3.66s)
| RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.13s)
| RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (30.87s)
| SUMMARY:
| openjdk-8-test-image () - Ran 9 tests in 50.263s
The java.JavaTest.test_java_jar_comp_mode failure can be ignored for now,
as that test verifies compiled mode which is not available on arm. The
testcase must be fixed instead.
(We need to refresh one unrelated existing patch to avoid patch fuzz warnings)
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch')
-rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch b/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch new file mode 100644 index 0000000..fb7bb59 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From f6424c46b4af08d0662eec1a5897d5502270a3b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> | ||
3 | Date: Mon, 13 Aug 2018 16:40:34 +0100 | ||
4 | Subject: [PATCH 1/5] hotspot: fix -Wreturn-type issues introduced by 8061651 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | |# HG changeset patch | ||
10 | |# User andrew | ||
11 | |# Date 1529475043 -3600 | ||
12 | |# Wed Jun 20 07:10:43 2018 +0100 | ||
13 | |# Node ID f6341f4635dacb56678264d29a88cd052b74036b | ||
14 | |# Parent 30520d5018b509b0ae68f5fcc9a5c540e3e5b2de | ||
15 | PR3601: Fix additional -Wreturn-type issues introduced by 8061651 | ||
16 | |||
17 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
18 | Upstream-Status: Backport | ||
19 | --- | ||
20 | hotspot/src/share/vm/prims/jvm.cpp | 6 +++--- | ||
21 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp | ||
24 | index 07c36de8..067fd3ac 100644 | ||
25 | --- a/hotspot/src/share/vm/prims/jvm.cpp | ||
26 | +++ b/hotspot/src/share/vm/prims/jvm.cpp | ||
27 | @@ -835,7 +835,7 @@ JVM_END | ||
28 | JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname)) | ||
29 | JVMWrapper("JVM_KnownToNotExist"); | ||
30 | #if INCLUDE_CDS | ||
31 | - return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false)); | ||
32 | + return ClassLoaderExt::known_to_not_exist(env, loader, classname, THREAD); | ||
33 | #else | ||
34 | return false; | ||
35 | #endif | ||
36 | @@ -845,7 +845,7 @@ JVM_END | ||
37 | JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader)) | ||
38 | JVMWrapper("JVM_GetResourceLookupCacheURLs"); | ||
39 | #if INCLUDE_CDS | ||
40 | - return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL); | ||
41 | + return ClassLoaderExt::get_lookup_cache_urls(env, loader, THREAD); | ||
42 | #else | ||
43 | return NULL; | ||
44 | #endif | ||
45 | @@ -855,7 +855,7 @@ JVM_END | ||
46 | JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name)) | ||
47 | JVMWrapper("JVM_GetResourceLookupCache"); | ||
48 | #if INCLUDE_CDS | ||
49 | - return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL); | ||
50 | + return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, THREAD); | ||
51 | #else | ||
52 | return NULL; | ||
53 | #endif | ||
54 | -- | ||
55 | 2.18.0 | ||
56 | |||