1 |
xarthisius 12/08/27 08:15:35 |
2 |
|
3 |
Added: guile-1.8.8-gcc46.patch |
4 |
Log: |
5 |
Backport upstream patch to fix SIGSEGV with gcc-4.6 wrt #424475 by Ivan Bagaev <gmiramir@×××××.com> Thanks to Cyprien Nicolas (fulax) <c.nicolas+bugs@×××××.com> for detailed analysis and finding patch. Acked by hkBst |
6 |
|
7 |
(Portage version: 2.2.0_alpha123/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-scheme/guile/files/guile-1.8.8-gcc46.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/guile/files/guile-1.8.8-gcc46.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/guile/files/guile-1.8.8-gcc46.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: guile-1.8.8-gcc46.patch |
16 |
=================================================================== |
17 |
Backported upstream patch to fix SIGSEGV with gcc-4.6 |
18 |
|
19 |
http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=62bc1072c19e81bb0f9e42a5034e7ab8c27d3b94 |
20 |
https://bugs.gentoo.org/show_bug.cgi?id=424475 |
21 |
--- a/configure.in |
22 |
+++ b/configure.in |
23 |
@@ -1199,23 +1199,20 @@ |
24 |
AC_RUN_IFELSE([AC_LANG_SOURCE( |
25 |
[AC_INCLUDES_DEFAULT |
26 |
int |
27 |
-find_stack_direction () |
28 |
+find_stack_direction (int *addr, int depth) |
29 |
{ |
30 |
- static char *addr = 0; |
31 |
- auto char dummy; |
32 |
- if (addr == 0) |
33 |
- { |
34 |
- addr = &dummy; |
35 |
- return find_stack_direction (); |
36 |
- } |
37 |
- else |
38 |
- return (&dummy > addr) ? 1 : -1; |
39 |
+ int dir, dummy = 0; |
40 |
+ if (! addr) |
41 |
+ addr = &dummy; |
42 |
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; |
43 |
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0; |
44 |
+ return dir + dummy; |
45 |
} |
46 |
|
47 |
int |
48 |
-main () |
49 |
+main (int argc, char **argv) |
50 |
{ |
51 |
- return find_stack_direction () < 0; |
52 |
+ return find_stack_direction (0, argc + !argv + 20) < 0; |
53 |
}])], |
54 |
[SCM_I_GSC_STACK_GROWS_UP=1], |
55 |
[], |