guile: workaround ice ssa corruption while DEBUG_BUILD
Add: MACHINE = "qemux86-64" DEBUG_BUILD = "1" to local.conf and there was a ssa corruption to build guile: .. Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE. sp_48(ab) and sp_3476(ab) guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine': guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption #define VM_NAME vm_debug_engine ^ guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME' VM_NAME (SCM vm, SCM program, SCM *argv, int nargs) ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ... Tweak libguile/vm-i-system.c to check the value of nshuf to workaround it. The tweak didn't change previous logic. [YOCTO #6411] (From OE-Core rev: 3470bbf4ae178479bd090d7191d6f0469f154b0d) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ffb4933475
commit
cf385a5587
|
@ -0,0 +1,60 @@
|
|||
libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
|
||||
|
||||
While compiling with option -g -O, there was a ssa corruption:
|
||||
..
|
||||
Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
|
||||
sp_48(ab) and sp_3476(ab)
|
||||
guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
|
||||
guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
|
||||
#define VM_NAME vm_debug_engine
|
||||
^
|
||||
guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
|
||||
VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
|
||||
^
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <http://gcc.gnu.org/bugs.html> for instructions.
|
||||
...
|
||||
|
||||
Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
libguile/vm-i-system.c | 20 ++++++++++++++++----
|
||||
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
|
||||
--- a/libguile/vm-i-system.c
|
||||
+++ b/libguile/vm-i-system.c
|
||||
@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
|
||||
/* now shuffle up, from walk to ntotal */
|
||||
{
|
||||
scm_t_ptrdiff nshuf = sp - walk + 1, i;
|
||||
- sp = (fp - 1) + ntotal + nshuf;
|
||||
- CHECK_OVERFLOW ();
|
||||
- for (i = 0; i < nshuf; i++)
|
||||
- sp[-i] = walk[nshuf-i-1];
|
||||
+ /* check the value of nshuf to workaround ice ssa corruption */
|
||||
+ /* while compiling with -O -g */
|
||||
+ if (nshuf > 0)
|
||||
+ {
|
||||
+ sp = (fp - 1) + ntotal + nshuf;
|
||||
+ CHECK_OVERFLOW ();
|
||||
+ for (i = 0; i < nshuf; i++)
|
||||
+ sp[-i] = walk[nshuf-i-1];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ sp = (fp - 1) + ntotal + nshuf;
|
||||
+ CHECK_OVERFLOW ();
|
||||
+ for (i = 0; i < nshuf; i++)
|
||||
+ sp[-i] = walk[nshuf-i-1];
|
||||
+ }
|
||||
}
|
||||
/* and fill optionals & keyword args with SCM_UNDEFINED */
|
||||
while (walk <= (fp - 1) + ntotal)
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
|
|||
file://opensuse/guile-64bit.patch \
|
||||
file://guile_2.0.6_fix_sed_error.patch \
|
||||
file://arm_endianness.patch \
|
||||
file://workaround-ice-ssa-corruption.patch \
|
||||
"
|
||||
|
||||
# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
|
||||
|
|
Loading…
Reference in New Issue