summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorGábor Boskovits <boskovits@gmail.com>2018-07-03 00:50:32 +0200
committerGábor Boskovits <boskovits@gmail.com>2018-07-03 00:53:56 +0200
commitdb024183c9fa93289a45e816529e99001de0a7d1 (patch)
treeae911f6f2245e03fac96577637479e2e7ff84fcb /gnu
parent3dbf331942f11ee888ccbf849cacdd3a0ab971cd (diff)
gnu: icedtea: Work around gcc segfault.
* gnu/packages/java.scm (icedtea-7)[native-inputs]: Add patch to hotspot. * gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/java.scm12
-rw-r--r--gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch45
3 files changed, 56 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 10b61ba1baa..925f87763d4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -802,6 +802,7 @@ dist_patch_DATA = \
802 %D%/packages/patches/icecat-use-system-graphite2.patch \ 802 %D%/packages/patches/icecat-use-system-graphite2.patch \
803 %D%/packages/patches/icecat-use-system-harfbuzz.patch \ 803 %D%/packages/patches/icecat-use-system-harfbuzz.patch \
804 %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ 804 %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \
805 %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \
805 %D%/packages/patches/id3lib-CVE-2007-4460.patch \ 806 %D%/packages/patches/id3lib-CVE-2007-4460.patch \
806 %D%/packages/patches/ilmbase-fix-tests.patch \ 807 %D%/packages/patches/ilmbase-fix-tests.patch \
807 %D%/packages/patches/intltool-perl-compatibility.patch \ 808 %D%/packages/patches/intltool-perl-compatibility.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f2f7078459d..b4f811cf93a 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1405,8 +1405,16 @@ bootstrapping purposes.")
1405 ,(drop "langtools" 1405 ,(drop "langtools"
1406 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) 1406 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1407 ("hotspot-drop" 1407 ("hotspot-drop"
1408 ,(drop "hotspot" 1408 ,(origin
1409 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) 1409 (method url-fetch)
1410 (uri (string-append
1411 "http://icedtea.classpath.org/downloads/drops"
1412 "/icedtea7/" version "/hotspot.tar.bz2"))
1413 (sha256
1414 (base32
1415 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1416 (patches (search-patches
1417 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1410 ("ant" ,ant-bootstrap) 1418 ("ant" ,ant-bootstrap)
1411 ("attr" ,attr) 1419 ("attr" ,attr)
1412 ("coreutils" ,coreutils) 1420 ("coreutils" ,coreutils)
diff --git a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch
new file mode 100644
index 00000000000..35cfe381525
--- /dev/null
+++ b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch
@@ -0,0 +1,45 @@
1From 2f0ef2c69e99e1096a2a72c7a29025a736b044b4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com>
3Date: Mon, 2 Jul 2018 23:37:25 +0200
4Subject: [PATCH] Fix gcc segfault.
5
6---
7 src/share/vm/opto/output.cpp | 8 +++++---
8 1 file changed, 5 insertions(+), 3 deletions(-)
9
10diff --git a/src/share/vm/opto/output.cpp b/src/share/vm/opto/output.cpp
11index d46cb87..0eb9eda 100644
12--- a/src/share/vm/opto/output.cpp
13+++ b/src/share/vm/opto/output.cpp
14@@ -1787,6 +1787,8 @@ uint Scheduling::_total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+
15
16 // Initializer for class Scheduling
17
18+volatile const void *eePointer = Pipeline_Use::elaborated_elements;
19+
20 Scheduling::Scheduling(Arena *arena, Compile &compile)
21 : _arena(arena),
22 _cfg(compile.cfg()),
23@@ -1829,7 +1831,7 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
24 memset(_current_latency, 0, node_max * sizeof(unsigned short));
25
26 // Clear the bundling information
27- memcpy(_bundle_use_elements, Pipeline_Use::elaborated_elements, sizeof(Pipeline_Use::elaborated_elements));
28+ memcpy(_bundle_use_elements, (void *)eePointer, 11*sizeof(Pipeline_Use_Element));
29
30 // Get the last node
31 Block* block = _cfg->get_block(_cfg->number_of_blocks() - 1);
32@@ -1880,8 +1882,8 @@ void Scheduling::step_and_clear() {
33 _bundle_use.reset();
34
35 memcpy(_bundle_use_elements,
36- Pipeline_Use::elaborated_elements,
37- sizeof(Pipeline_Use::elaborated_elements));
38+ (void *)eePointer,
39+ 11*sizeof(Pipeline_Use_Element));
40 }
41
42 // Perform instruction scheduling and bundling over the sequence of
43--
442.18.0
45