diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2016-10-31 11:34:33 +0100 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-12-06 16:25:08 -0200 |
commit | 97f81e65843dd1e01c55cae528fd766dd13a265d (patch) | |
tree | a7ba1797b3f9bfb95acb242c518020256eedbf3c | |
parent | 2a3cd732ce7efea9f372862be7ef70ff5ecb50d9 (diff) | |
download | meta-java-97f81e65843dd1e01c55cae528fd766dd13a265d.tar.gz |
icedtea7-native: Fix segmentation fault
Without this patch the generated icedtea produces segmentation faults.
This is probably due to a race condition during cleanout.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r-- | recipes-core/icedtea/icedtea7-native.inc | 2 | ||||
-rw-r--r-- | recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch | 42 |
2 files changed, 44 insertions, 0 deletions
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index a8428dc..55cb7e7 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc | |||
@@ -42,6 +42,7 @@ SRC_URI = " \ | |||
42 | file://allow-headless-build.patch;striplevel=0 \ | 42 | file://allow-headless-build.patch;striplevel=0 \ |
43 | file://jaxws_fix_NullPointerException.patch;apply=no \ | 43 | file://jaxws_fix_NullPointerException.patch;apply=no \ |
44 | file://timezoneszip.patch \ | 44 | file://timezoneszip.patch \ |
45 | file://sigsegv.patch;apply=no \ | ||
45 | " | 46 | " |
46 | 47 | ||
47 | S = "${WORKDIR}/${ICEDTEA}" | 48 | S = "${WORKDIR}/${ICEDTEA}" |
@@ -152,6 +153,7 @@ do_configure_append() { | |||
152 | oe_runmake patch-boot | 153 | oe_runmake patch-boot |
153 | 154 | ||
154 | patch -p1 < ${WORKDIR}/jaxws_fix_NullPointerException.patch | 155 | patch -p1 < ${WORKDIR}/jaxws_fix_NullPointerException.patch |
156 | patch -p1 < ${WORKDIR}/sigsegv.patch | ||
155 | } | 157 | } |
156 | 158 | ||
157 | EXTRA_OEMAKE = ' \ | 159 | EXTRA_OEMAKE = ' \ |
diff --git a/recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch b/recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch new file mode 100644 index 0000000..0c3e44e --- /dev/null +++ b/recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | diff --git a/openjdk-boot/hotspot/src/share/vm/runtime/thread.cpp b/openjdk-boot/hotspot/src/share/vm/runtime/thread.cpp | ||
2 | index 8b7059c8389f..67e9e7bd4bce 100644 | ||
3 | --- a/openjdk-boot/hotspot/src/share/vm/runtime/thread.cpp | ||
4 | +++ b/openjdk-boot/hotspot/src/share/vm/runtime/thread.cpp | ||
5 | @@ -764,10 +764,13 @@ bool Thread::claim_oops_do_par_case(int strong_roots_parity) { | ||
6 | } | ||
7 | |||
8 | void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) { | ||
9 | - active_handles()->oops_do(f); | ||
10 | + if (f && active_handles()) | ||
11 | + active_handles()->oops_do(f); | ||
12 | // Do oop for ThreadShadow | ||
13 | - f->do_oop((oop*)&_pending_exception); | ||
14 | - handle_area()->oops_do(f); | ||
15 | + if (f) | ||
16 | + f->do_oop((oop*)&_pending_exception); | ||
17 | + if (f && handle_area()) | ||
18 | + handle_area()->oops_do(f); | ||
19 | } | ||
20 | |||
21 | void Thread::nmethods_do(CodeBlobClosure* cf) { | ||
22 | diff --git a/openjdk/hotspot/src/share/vm/runtime/thread.cpp b/openjdk/hotspot/src/share/vm/runtime/thread.cpp | ||
23 | index 8b7059c8389f..67e9e7bd4bce 100644 | ||
24 | --- a/openjdk/hotspot/src/share/vm/runtime/thread.cpp | ||
25 | +++ b/openjdk/hotspot/src/share/vm/runtime/thread.cpp | ||
26 | @@ -764,10 +764,13 @@ bool Thread::claim_oops_do_par_case(int strong_roots_parity) { | ||
27 | } | ||
28 | |||
29 | void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) { | ||
30 | - active_handles()->oops_do(f); | ||
31 | + if (f && active_handles()) | ||
32 | + active_handles()->oops_do(f); | ||
33 | // Do oop for ThreadShadow | ||
34 | - f->do_oop((oop*)&_pending_exception); | ||
35 | - handle_area()->oops_do(f); | ||
36 | + if (f) | ||
37 | + f->do_oop((oop*)&_pending_exception); | ||
38 | + if (f && handle_area()) | ||
39 | + handle_area()->oops_do(f); | ||
40 | } | ||
41 | |||
42 | void Thread::nmethods_do(CodeBlobClosure* cf) { | ||