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 /recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch | |
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>
Diffstat (limited to 'recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch')
-rw-r--r-- | recipes-core/icedtea/openjdk-7-03b147/sigsegv.patch | 42 |
1 files changed, 42 insertions, 0 deletions
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) { | ||