Gentoo Archives: gentoo-commits

From: Amy Winston <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-scheme/guile/, dev-scheme/guile/files/
Date: Wed, 21 Sep 2016 18:11:55
Message-Id: 1474480905.cdf949db050341aec29539c5fb926f60b7fcffad.amynka@gentoo
1 commit: cdf949db050341aec29539c5fb926f60b7fcffad
2 Author: Amy Winston <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 21 17:58:59 2016 +0000
4 Commit: Amy Winston <amynka <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 21 18:01:45 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdf949db
7
8 dev-scheme/guile: add patch for bug #594010
9
10 Package-Manager: portage-2.2.28
11
12 ...uile-2.0.12-workaround-ice-ssa-corruption.patch | 64 ++++++++++++++++++++++
13 dev-scheme/guile/guile-2.0.12-r1.ebuild | 3 +-
14 2 files changed, 66 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-scheme/guile/files/guile-2.0.12-workaround-ice-ssa-corruption.patch b/dev-scheme/guile/files/guile-2.0.12-workaround-ice-ssa-corruption.patch
17 new file mode 100644
18 index 00000000..54f3158
19 --- /dev/null
20 +++ b/dev-scheme/guile/files/guile-2.0.12-workaround-ice-ssa-corruption.patch
21 @@ -0,0 +1,64 @@
22 +libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
23 +
24 +While compiling with option -g -O, there was a ssa corruption:
25 +..
26 +Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
27 +sp_48(ab) and sp_3476(ab)
28 +guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
29 +guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
30 + #define VM_NAME vm_debug_engine
31 + ^
32 +guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
33 + VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
34 + ^
35 +Please submit a full bug report,
36 +with preprocessed source if appropriate.
37 +See <http://gcc.gnu.org/bugs.html> for instructions.
38 +...
39 +
40 +Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
41 +
42 +Upstream-Status: Pending
43 +
44 +Signed-off-by: Hongxu Jia <hongxu.jia@×××××××××.com>
45 +
46 +Fixes Buildroot autobuilder failures on AArch64.
47 +
48 +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@××××××××××××××.com>
49 +---
50 + libguile/vm-i-system.c | 20 ++++++++++++++++----
51 + 1 file changed, 16 insertions(+), 4 deletions(-)
52 +
53 +diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
54 +--- a/libguile/vm-i-system.c
55 ++++ b/libguile/vm-i-system.c
56 +@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
57 + /* now shuffle up, from walk to ntotal */
58 + {
59 + scm_t_ptrdiff nshuf = sp - walk + 1, i;
60 +- sp = (fp - 1) + ntotal + nshuf;
61 +- CHECK_OVERFLOW ();
62 +- for (i = 0; i < nshuf; i++)
63 +- sp[-i] = walk[nshuf-i-1];
64 ++ /* check the value of nshuf to workaround ice ssa corruption */
65 ++ /* while compiling with -O -g */
66 ++ if (nshuf > 0)
67 ++ {
68 ++ sp = (fp - 1) + ntotal + nshuf;
69 ++ CHECK_OVERFLOW ();
70 ++ for (i = 0; i < nshuf; i++)
71 ++ sp[-i] = walk[nshuf-i-1];
72 ++ }
73 ++ else
74 ++ {
75 ++ sp = (fp - 1) + ntotal + nshuf;
76 ++ CHECK_OVERFLOW ();
77 ++ for (i = 0; i < nshuf; i++)
78 ++ sp[-i] = walk[nshuf-i-1];
79 ++ }
80 + }
81 + /* and fill optionals & keyword args with SCM_UNDEFINED */
82 + while (walk <= (fp - 1) + ntotal)
83 +--
84 +1.9.1
85 +
86
87 diff --git a/dev-scheme/guile/guile-2.0.12-r1.ebuild b/dev-scheme/guile/guile-2.0.12-r1.ebuild
88 index 35bd1b0..7a08ad6 100644
89 --- a/dev-scheme/guile/guile-2.0.12-r1.ebuild
90 +++ b/dev-scheme/guile/guile-2.0.12-r1.ebuild
91 @@ -31,7 +31,8 @@ DEPEND="${RDEPEND}
92 SLOT="12/22" # subslot is soname version
93 MAJOR="2.0"
94
95 -PATCHES=( "${FILESDIR}/${P}-build_includes2.patch" ) #bug 590528 patched by upstream second try
96 +PATCHES=( "${FILESDIR}/${P}-build_includes2.patch"
97 + "${FILESDIR}/${P}-workaround-ice-ssa-corruption.patch" ) # includes2 bug 590528 patched by upstream, bug 594010
98 DOCS=( GUILE-VERSION HACKING README )
99
100 src_prepare() {