diff mbox

[libgo] : Double StackMin size for 64bit non-split-stack targets

Message ID CAFULd4ZAn_SFYqMF5XLoACH5Fcedhc83ktqMo=qgudo5VinZPQ@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Dec. 24, 2014, 11:44 a.m. UTC
Hello!

The attached patch doubles StackMin size for 64bit non-split-stack
targets. This patch fixes regexp libgo failure (tracked as gcc PR61871
[1]) on alpha-linux-gnu.

--cut here--
--cut here--

Bootstrapped and regression tested on alphaev68-linux-gnu.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61871

Uros.

Comments

Ian Lance Taylor Jan. 5, 2015, 4:13 p.m. UTC | #1
On Wed, Dec 24, 2014 at 3:44 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> The attached patch doubles StackMin size for 64bit non-split-stack
> targets. This patch fixes regexp libgo failure (tracked as gcc PR61871
> [1]) on alpha-linux-gnu.
>
> --cut here--
> Index: runtime/proc.c
> ===================================================================
> --- runtime/proc.c      (revision 219035)
> +++ runtime/proc.c      (working copy)
> @@ -51,7 +51,7 @@
>  #if defined(USING_SPLIT_STACK) && defined(LINKER_SUPPORTS_SPLIT_STACK)
>  # define StackMin PTHREAD_STACK_MIN
>  #else
> -# define StackMin 2 * 1024 * 1024
> +# define StackMin ((sizeof(char *) < 8) ? 2 * 1024 * 1024 : 4 * 1024 * 1024)
>  #endif
>
>  uintptr runtime_stacks_sys;
> --cut here--


Thanks.  Committed.  Sorry for the delay.

Ian
diff mbox

Patch

Index: runtime/proc.c
===================================================================
--- runtime/proc.c      (revision 219035)
+++ runtime/proc.c      (working copy)
@@ -51,7 +51,7 @@ 
 #if defined(USING_SPLIT_STACK) && defined(LINKER_SUPPORTS_SPLIT_STACK)
 # define StackMin PTHREAD_STACK_MIN
 #else
-# define StackMin 2 * 1024 * 1024
+# define StackMin ((sizeof(char *) < 8) ? 2 * 1024 * 1024 : 4 * 1024 * 1024)
 #endif

 uintptr runtime_stacks_sys;