Commit fc4eaccf by Ian Lance Taylor

runtime: make gsignal stack at least SIGSTKSZ bytes

    
    The default stack size for the gsignal goroutine, 32K, is not enough on
    ia64.  Make sure that the stack size is at least SIGSTKSZ.
    
    Reviewed-on: https://go-review.googlesource.com/28224

From-SVN: r239894
parent 96f14006
394486a1cec9bbb81216311ed153179d9fe1c2c5 c8cf90f2daf62428ca6aa0b5674572cd99f25fe3
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -272,7 +272,14 @@ runtime_tickspersecond(void) ...@@ -272,7 +272,14 @@ runtime_tickspersecond(void)
void void
runtime_mpreinit(M *mp) runtime_mpreinit(M *mp)
{ {
mp->gsignal = runtime_malg(32*1024, (byte**)&mp->gsignalstack, &mp->gsignalstacksize); // OS X wants >=8K, Linux >=2K int32 stacksize = 32 * 1024; // OS X wants >=8K, Linux >=2K
#ifdef SIGSTKSZ
if(stacksize < SIGSTKSZ)
stacksize = SIGSTKSZ;
#endif
mp->gsignal = runtime_malg(stacksize, (byte**)&mp->gsignalstack, &mp->gsignalstacksize);
mp->gsignal->m = mp; mp->gsignal->m = mp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment