diff options
-rw-r--r-- | recipes-core/cacao/cacao-initial-native_0.98.bb | 1 | ||||
-rw-r--r-- | recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-core/cacao/cacao-initial-native_0.98.bb b/recipes-core/cacao/cacao-initial-native_0.98.bb index ec7fbdb..2a8ced5 100644 --- a/recipes-core/cacao/cacao-initial-native_0.98.bb +++ b/recipes-core/cacao/cacao-initial-native_0.98.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "\ | |||
14 | http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2; \ | 14 | http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2; \ |
15 | file://cacao-0.98-initial.patch \ | 15 | file://cacao-0.98-initial.patch \ |
16 | file://disable_hw_exceptions.patch \ | 16 | file://disable_hw_exceptions.patch \ |
17 | file://cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | # libjvm disabled - it would conflict with cacao-native installations | 20 | # libjvm disabled - it would conflict with cacao-native installations |
diff --git a/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch b/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch new file mode 100644 index 0000000..ccc35cb --- /dev/null +++ b/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | This fixes undefined behaviour in boehm GC as suggested at | ||
4 | https://github.com/ivmai/bdwgc/commit/16780405c899f01119bc45167122b4242f6b34fb. | ||
5 | |||
6 | The undefined behaviour at very least causes a segmentation fault during | ||
7 | classpath-native configure step. | ||
8 | |||
9 | Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com> | ||
10 | |||
11 | --- cacao-0.98/src/mm/boehm-gc/mark_rts.c | ||
12 | +++ cacao-0.98/src/mm/boehm-gc/mark_rts.c | ||
13 | @@ -371,18 +371,7 @@ ptr_t p; | ||
14 | |||
15 | ptr_t GC_approx_sp() | ||
16 | { | ||
17 | - VOLATILE word dummy; | ||
18 | - | ||
19 | - dummy = 42; /* Force stack to grow if necessary. Otherwise the */ | ||
20 | - /* later accesses might cause the kernel to think we're */ | ||
21 | - /* doing something wrong. */ | ||
22 | -# ifdef _MSC_VER | ||
23 | -# pragma warning(disable:4172) | ||
24 | -# endif | ||
25 | - return((ptr_t)(&dummy)); | ||
26 | -# ifdef _MSC_VER | ||
27 | -# pragma warning(default:4172) | ||
28 | -# endif | ||
29 | + return __builtin_frame_address(0); | ||
30 | } | ||
31 | |||
32 | /* | ||
33 | -- | ||
34 | 2.1.4 | ||
35 | |||