Am 07/08/13 16:56, schrieb Dave Wagler:
> This error occurs while compiling gcc-4.7.2:
>
> ../../../gcc-4.7.2/libgcc/libgcc2.c: In function '__multi3':
> ../../../gcc-4.7.2/libgcc/libgcc2.c:559:1: internal compiler error:
> Segmentation fault
I had segfaults with gcc-4.7.2 due to limited stackspace. gcc-4.7.2 uses
alloca to reserve mem on the stack. You can:
-1-
use ulimit -s to show your stacksize limit and change it with eg.
ulimit -s 20000 to raise the limit
-2-
use the attached patch to change from alloca to xmalloc which will use
the heap instead of the stack
have fun,
thorsten
--- gcc-4.7.2/gcc/ifcvt.c-o 2013-01-16 15:07:24.611752676 +0100
+++ gcc-4.7.2/gcc/ifcvt.c 2013-01-16 15:07:29.379752535 +0100
@@ -2853,8 +2853,10 @@
register. */
max_reg = max_reg_num ();
size = (max_reg + 1) * sizeof (rtx);
- then_vals = (rtx *) alloca (size);
- else_vals = (rtx *) alloca (size);
+ then_vals = (rtx *) xmalloc (size);
+ if ( then_vals == NULL ) return FALSE;
+ else_vals = (rtx *) xmalloc (size);
+ if ( else_vals == NULL ) { free(then_vals); return FALSE; }
memset (then_vals, 0, size);
memset (else_vals, 0, size);
@@ -2865,6 +2867,8 @@
{
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return FALSE;
}
@@ -2890,6 +2894,8 @@
{
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return FALSE;
}
}
@@ -2908,6 +2914,8 @@
{
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return FALSE;
}
@@ -2923,6 +2931,8 @@
end_sequence ();
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return FALSE;
}
seq = end_ifcvt_sequence (if_info);
@@ -2930,6 +2940,8 @@
{
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return FALSE;
}
@@ -2964,10 +2976,11 @@
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
+ if (then_vals) free (then_vals);
+ if (else_vals) free (else_vals);
return TRUE;
}
-
/* Determine if a given basic block heads a simple IF-THEN-JOIN or an
IF-THEN-ELSE-JOIN block.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page