summaryrefslogtreecommitdiffstats
path: root/recipes-core/cacao/files
diff options
context:
space:
mode:
authorErkka Kääriä <erkka.kaaria@intel.com>2015-10-21 12:41:49 +0300
committerMaxin B. John <maxin.john@intel.com>2015-10-23 10:51:06 +0300
commitd7d4f64a32d26fc8a92e4c89b47c78956f20a14d (patch)
tree8bc220c18d8d91d28be2e4b1bdd783c8992dd21d /recipes-core/cacao/files
parent38f4c1365c11c0c369e297ec53591439be589fb0 (diff)
downloadmeta-java-d7d4f64a32d26fc8a92e4c89b47c78956f20a14d.tar.gz
cacao-initial-native: Fix undefined behaviour in gc
Upstream-Status: Backport Fixes undefined behaviour in boehm GC used by cacao-initial-native as suggested at https://github.com/ivmai/bdwgc/commit/16780405c899f01119bc45167122b4242f6b34fb. The undefined behaviour at very least causes a segmentation fault during classpath-native configure step with Fedora 22. Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com> Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'recipes-core/cacao/files')
-rw-r--r--recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch35
1 files changed, 35 insertions, 0 deletions
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 @@
1Upstream-Status: Backport
2
3This fixes undefined behaviour in boehm GC as suggested at
4https://github.com/ivmai/bdwgc/commit/16780405c899f01119bc45167122b4242f6b34fb.
5
6The undefined behaviour at very least causes a segmentation fault during
7classpath-native configure step.
8
9Signed-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--
342.1.4
35